[{"data":1,"prerenderedAt":390},["ShallowReactive",2],{"navigation":3,"-drivers-mongodb":137,"-drivers-mongodb-surround":385},[4,26],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","/guide","1.guide/1.index",[9,11,16,21],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Utilities","/guide/utils","1.guide/2.utils","et:tools-2",{"title":17,"path":18,"stem":19,"icon":20},"HTTP Server","/guide/http-server","1.guide/3.http-server","ic:baseline-http",{"title":22,"path":23,"stem":24,"icon":25},"Custom Driver","/guide/custom-driver","1.guide/4.custom-driver","carbon:area-custom",{"title":27,"path":28,"stem":29,"children":30,"icon":32},"Drivers","/drivers","2.drivers/0.index",[31,33,38,43,48,53,58,63,68,73,77,82,87,92,97,102,107,112,117,122,127,132],{"title":27,"path":28,"stem":29,"icon":32},"icon-park-outline:hard-disk",{"title":34,"path":35,"stem":36,"icon":37},"Azure","/drivers/azure","2.drivers/azure","mdi:microsoft-azure",{"title":39,"path":40,"stem":41,"icon":42},"Browser","/drivers/browser","2.drivers/browser","ph:browser-thin",{"title":44,"path":45,"stem":46,"icon":47},"Capacitor Preferences","/drivers/capacitor-preferences","2.drivers/capacitor-preferences","nonicons:capacitor-16",{"title":49,"path":50,"stem":51,"icon":52},"Cloudflare","/drivers/cloudflare","2.drivers/cloudflare","devicon-plain:cloudflareworkers",{"title":54,"path":55,"stem":56,"icon":57},"SQL Database","/drivers/database","2.drivers/database","ph:database",{"title":59,"path":60,"stem":61,"icon":62},"Deno KV","/drivers/deno","2.drivers/deno","simple-icons:deno",{"title":64,"path":65,"stem":66,"icon":67},"Filesystem (Node.js)","/drivers/fs","2.drivers/fs","ph:file-light",{"title":69,"path":70,"stem":71,"icon":72},"GitHub","/drivers/github","2.drivers/github","mdi:github",{"title":74,"path":75,"stem":76,"icon":20},"HTTP","/drivers/http","2.drivers/http",{"title":78,"path":79,"stem":80,"icon":81},"LRU Cache","/drivers/lru-cache","2.drivers/lru-cache","material-symbols:cached-rounded",{"title":83,"path":84,"stem":85,"icon":86},"Memory","/drivers/memory","2.drivers/memory","bi:memory",{"title":88,"path":89,"stem":90,"icon":91},"MongoDB","/drivers/mongodb","2.drivers/mongodb","teenyicons:mongodb-outline",{"title":93,"path":94,"stem":95,"icon":96},"Netlify Blobs","/drivers/netlify","2.drivers/netlify","teenyicons:netlify-solid",{"title":98,"path":99,"stem":100,"icon":101},"Null","/drivers/null","2.drivers/null","bi:trash3-fill",{"title":103,"path":104,"stem":105,"icon":106},"Overlay","/drivers/overlay","2.drivers/overlay","carbon:overlay",{"title":108,"path":109,"stem":110,"icon":111},"PlanetScale","/drivers/planetscale","2.drivers/planetscale","simple-icons:planetscale",{"title":113,"path":114,"stem":115,"icon":116},"Redis","/drivers/redis","2.drivers/redis","simple-icons:redis",{"title":118,"path":119,"stem":120,"icon":121},"S3","/drivers/s3","2.drivers/s3","simple-icons:amazons3",{"title":123,"path":124,"stem":125,"icon":126},"UploadThing","/drivers/uploadthing","2.drivers/uploadthing","qlementine-icons:cloud-16",{"title":128,"path":129,"stem":130,"icon":131},"Upstash","/drivers/upstash","2.drivers/upstash","simple-icons:upstash",{"title":133,"path":134,"stem":135,"icon":136},"Vercel","/drivers/vercel","2.drivers/vercel","gg:vercel",{"id":138,"title":88,"body":139,"description":379,"extension":380,"meta":381,"navigation":382,"path":89,"seo":383,"stem":90,"__hash__":384},"content/2.drivers/mongodb.md",{"type":140,"value":141,"toc":376,"icon":91},"minimark",[142,147,159,166,169,175,178,181,311,316,319,331,336,372],[143,144,146],"h2",{"id":145},"usage","Usage",[148,149,150,154,155],"p",{},[151,152,153],"strong",{},"Driver name:"," ",[156,157,158],"code",{},"mongodb",[160,161,163],"read-more",{"to":162},"https://www.mongodb.com/",[148,164,165],{},"Learn more about MongoDB.",[148,167,168],{},"This driver stores KV information in a MongoDB collection with a separate document for each key value pair.",[148,170,171,172,174],{},"To use it, you will need to install ",[156,173,158],{}," in your project:",[176,177],"pm-install",{"name":158},[148,179,180],{},"Usage:",[182,183,188],"pre",{"className":184,"code":185,"language":186,"meta":187,"style":187},"language-js shiki shiki-themes github-light github-dark github-dark","import { createStorage } from \"unstorage\";\nimport mongodbDriver from \"unstorage/drivers/mongodb\";\n\nconst storage = createStorage({\n  driver: mongodbDriver({\n    connectionString: \"CONNECTION_STRING\",\n    databaseName: \"test\",\n    collectionName: \"test\",\n  }),\n});\n","js","",[156,189,190,213,228,235,255,266,278,289,299,305],{"__ignoreMap":187},[191,192,195,199,203,206,210],"span",{"class":193,"line":194},"line",1,[191,196,198],{"class":197},"so5gQ","import",[191,200,202],{"class":201},"slsVL"," { createStorage } ",[191,204,205],{"class":197},"from",[191,207,209],{"class":208},"sfrk1"," \"unstorage\"",[191,211,212],{"class":201},";\n",[191,214,216,218,221,223,226],{"class":193,"line":215},2,[191,217,198],{"class":197},[191,219,220],{"class":201}," mongodbDriver ",[191,222,205],{"class":197},[191,224,225],{"class":208}," \"unstorage/drivers/mongodb\"",[191,227,212],{"class":201},[191,229,231],{"class":193,"line":230},3,[191,232,234],{"emptyLinePlaceholder":233},true,"\n",[191,236,238,241,245,248,252],{"class":193,"line":237},4,[191,239,240],{"class":197},"const",[191,242,244],{"class":243},"suiK_"," storage",[191,246,247],{"class":197}," =",[191,249,251],{"class":250},"shcOC"," createStorage",[191,253,254],{"class":201},"({\n",[191,256,258,261,264],{"class":193,"line":257},5,[191,259,260],{"class":201},"  driver: ",[191,262,263],{"class":250},"mongodbDriver",[191,265,254],{"class":201},[191,267,269,272,275],{"class":193,"line":268},6,[191,270,271],{"class":201},"    connectionString: ",[191,273,274],{"class":208},"\"CONNECTION_STRING\"",[191,276,277],{"class":201},",\n",[191,279,281,284,287],{"class":193,"line":280},7,[191,282,283],{"class":201},"    databaseName: ",[191,285,286],{"class":208},"\"test\"",[191,288,277],{"class":201},[191,290,292,295,297],{"class":193,"line":291},8,[191,293,294],{"class":201},"    collectionName: ",[191,296,286],{"class":208},[191,298,277],{"class":201},[191,300,302],{"class":193,"line":301},9,[191,303,304],{"class":201},"  }),\n",[191,306,308],{"class":193,"line":307},10,[191,309,310],{"class":201},"});\n",[148,312,313],{},[151,314,315],{},"Authentication:",[148,317,318],{},"The driver supports the following authentication methods:",[320,321,322],"ul",{},[323,324,325,330],"li",{},[151,326,327],{},[156,328,329],{},"connectionString",": The MongoDB connection string. This is the only way to authenticate.",[148,332,333],{},[151,334,335],{},"Options:",[320,337,338,349,358,366],{},[323,339,340,344,345,348],{},[151,341,342],{},[156,343,329],{}," (required): The connection string to use to connect to the MongoDB database. It should be in the format ",[156,346,347],{},"mongodb://\u003Cusername>:\u003Cpassword>@\u003Chost>:\u003Cport>/\u003Cdatabase>",".",[323,350,351,354,355,348],{},[156,352,353],{},"databaseName",": The name of the database to use. Defaults to ",[156,356,357],{},"unstorage",[323,359,360,363,364,348],{},[156,361,362],{},"collectionName",": The name of the collection to use. Defaults to ",[156,365,357],{},[323,367,368,371],{},[156,369,370],{},"clientOptions",": Optional configuration settings for the MongoClient instance.",[373,374,375],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":187,"searchDepth":215,"depth":215,"links":377},[378],{"id":145,"depth":215,"text":146},"Store data in MongoDB using Node.js MongoDB package.","md",{"icon":91},{"icon":91},{"title":88,"description":379},"8mhm4X-LZbPyUQBFS90kHsb31o0pzTwP61gfRXvDq98",[386,388],{"title":83,"path":84,"stem":85,"description":387,"icon":86,"children":-1},"Keep data in memory.",{"title":93,"path":94,"stem":95,"description":389,"icon":96,"children":-1},"Store data in Netlify Blobs.",1783786394258]