[{"data":1,"prerenderedAt":2174},["ShallowReactive",2],{"navigation":3,"-docs-storage":398,"-docs-storage-surround":2170},[4,93,222,228,383,395],{"title":5,"path":6,"stem":7,"children":8,"icon":92},"","/docs","1.docs/1.index",[9,12,17,22,27,32,37,42,47,52,57,62,67,72,77,82,87],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-compass",{"title":13,"path":14,"stem":15,"icon":16},"Quick Start","/docs/quick-start","1.docs/2.quick-start","i-lucide-zap",{"title":18,"path":19,"stem":20,"icon":21},"Renderer","/docs/renderer","1.docs/4.renderer","ri:layout-masonry-line",{"title":23,"path":24,"stem":25,"icon":26},"Routing","/docs/routing","1.docs/5.routing","ri:direction-line",{"title":28,"path":29,"stem":30,"icon":31},"Assets","/docs/assets","1.docs/50.assets","ri:image-2-line",{"title":33,"path":34,"stem":35,"icon":36},"Configuration","/docs/configuration","1.docs/50.configuration","ri:settings-3-line",{"title":38,"path":39,"stem":40,"icon":41},"Database","/docs/database","1.docs/50.database","ri:database-2-line",{"title":43,"path":44,"stem":45,"icon":46},"Lifecycle","/docs/lifecycle","1.docs/50.lifecycle","i-lucide-layers",{"title":48,"path":49,"stem":50,"icon":51},"OpenAPI","/docs/openapi","1.docs/50.openapi","ri:contract-line",{"title":53,"path":54,"stem":55,"icon":56},"Plugins","/docs/plugins","1.docs/50.plugins","ri:plug-line",{"title":58,"path":59,"stem":60,"icon":61},"Tasks","/docs/tasks","1.docs/50.tasks","codicon:run-all",{"title":63,"path":64,"stem":65,"icon":66},"WebSocket","/docs/websocket","1.docs/50.websocket","ri:broadcast-fill",{"title":68,"path":69,"stem":70,"icon":71},"Server Entry","/docs/server-entry","1.docs/6.server-entry","ri:server-line",{"title":73,"path":74,"stem":75,"icon":76},"Cache","/docs/cache","1.docs/7.cache","ri:speed-line",{"title":78,"path":79,"stem":80,"icon":81},"KV Storage","/docs/storage","1.docs/8.storage","carbon:datastore",{"title":83,"path":84,"stem":85,"icon":86},"Migration Guide","/docs/migration","1.docs/99.migration","ri:arrow-right-up-line",{"title":88,"path":89,"stem":90,"icon":91},"Nightly Channel","/docs/nightly","1.docs/99.nightly","ri:moon-fill","i-lucide-book-open",{"title":94,"path":95,"stem":96,"children":97,"icon":99},"Deploy","/deploy","2.deploy/0.index",[98,100,121],{"title":94,"path":95,"stem":96,"icon":99},"ri:upload-cloud-2-line",{"title":101,"path":102,"stem":103,"children":104,"page":120},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[105,110,115],{"title":106,"path":107,"stem":108,"icon":109},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":111,"path":112,"stem":113,"icon":114},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":116,"path":117,"stem":118,"icon":119},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":122,"path":123,"stem":124,"children":125,"page":120},"Providers","/deploy/providers","2.deploy/20.providers",[126,130,134,138,142,146,150,154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218],{"title":127,"path":128,"stem":129},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":131,"path":132,"stem":133},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":135,"path":136,"stem":137},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":139,"path":140,"stem":141},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":143,"path":144,"stem":145},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":147,"path":148,"stem":149},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":151,"path":152,"stem":153},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":155,"path":156,"stem":157},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":159,"path":160,"stem":161},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":163,"path":164,"stem":165},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":167,"path":168,"stem":169},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":171,"path":172,"stem":173},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":175,"path":176,"stem":177},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":179,"path":180,"stem":181},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":183,"path":184,"stem":185},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":187,"path":188,"stem":189},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":191,"path":192,"stem":193},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":195,"path":196,"stem":197},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":199,"path":200,"stem":201},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":203,"path":204,"stem":205},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":207,"path":208,"stem":209},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":211,"path":212,"stem":213},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":215,"path":216,"stem":217},"Zephyr Cloud","/deploy/providers/zephyr","2.deploy/20.providers/zephyr",{"title":219,"path":220,"stem":221},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":223,"path":224,"stem":225,"children":226,"icon":36},"Config","/config","3.config/0.index",[227],{"title":223,"path":224,"stem":225,"icon":36},{"title":229,"path":230,"stem":231,"children":232,"icon":234},"Examples","/examples","4.examples/0.index",[233,235,240,245,250,255,259,264,269,274,279,284,289,293,298,302,306,311,316,321,326,331,336,341,346,351,355,360,365,369,374,379],{"title":229,"path":230,"stem":231,"icon":234},"i-lucide-folder-code",{"title":236,"path":237,"stem":238,"icon":239},"API Routes","/examples/api-routes","4.examples/api-routes","i-lucide-route",{"title":241,"path":242,"stem":243,"icon":244},"Auto Imports","/examples/auto-imports","4.examples/auto-imports","i-lucide-import",{"title":246,"path":247,"stem":248,"icon":249},"Cached Handler","/examples/cached-handler","4.examples/cached-handler","i-lucide-clock",{"title":251,"path":252,"stem":253,"icon":254},"Custom Error Handler","/examples/custom-error-handler","4.examples/custom-error-handler","i-lucide-alert-circle",{"title":38,"path":256,"stem":257,"icon":258},"/examples/database","4.examples/database","i-lucide-database",{"title":260,"path":261,"stem":262,"icon":263},"Elysia","/examples/elysia","4.examples/elysia","i-skill-icons-elysia-dark",{"title":265,"path":266,"stem":267,"icon":268},"Express","/examples/express","4.examples/express","i-simple-icons-express",{"title":270,"path":271,"stem":272,"icon":273},"Fastify","/examples/fastify","4.examples/fastify","i-simple-icons-fastify",{"title":275,"path":276,"stem":277,"icon":278},"Hello World","/examples/hello-world","4.examples/hello-world","i-lucide-sparkles",{"title":280,"path":281,"stem":282,"icon":283},"Hono","/examples/hono","4.examples/hono","i-logos-hono",{"title":285,"path":286,"stem":287,"icon":288},"Import Alias","/examples/import-alias","4.examples/import-alias","i-lucide-at-sign",{"title":290,"path":291,"stem":292,"icon":46},"Middleware","/examples/middleware","4.examples/middleware",{"title":294,"path":295,"stem":296,"icon":297},"Mono JSX","/examples/mono-jsx","4.examples/mono-jsx","i-lucide-brackets",{"title":299,"path":300,"stem":301,"icon":297},"Nano JSX","/examples/nano-jsx","4.examples/nano-jsx",{"title":53,"path":303,"stem":304,"icon":305},"/examples/plugins","4.examples/plugins","i-lucide-plug",{"title":307,"path":308,"stem":309,"icon":310},"Custom Renderer","/examples/renderer","4.examples/renderer","i-lucide-code",{"title":312,"path":313,"stem":314,"icon":315},"Runtime Config","/examples/runtime-config","4.examples/runtime-config","i-lucide-settings",{"title":317,"path":318,"stem":319,"icon":320},"Server Fetch","/examples/server-fetch","4.examples/server-fetch","i-lucide-arrow-right-left",{"title":322,"path":323,"stem":324,"icon":325},"Shiki","/examples/shiki","4.examples/shiki","i-lucide-highlighter",{"title":327,"path":328,"stem":329,"icon":330},"Virtual Routes","/examples/virtual-routes","4.examples/virtual-routes","i-lucide-box",{"title":332,"path":333,"stem":334,"icon":335},"Vite Nitro Plugin","/examples/vite-nitro-plugin","4.examples/vite-nitro-plugin","i-logos-vitejs",{"title":337,"path":338,"stem":339,"icon":340},"Vite RSC","/examples/vite-rsc","4.examples/vite-rsc","i-logos-react",{"title":342,"path":343,"stem":344,"icon":345},"Vite SSR HTML","/examples/vite-ssr-html","4.examples/vite-ssr-html","i-logos-html-5",{"title":347,"path":348,"stem":349,"icon":350},"SSR with Preact","/examples/vite-ssr-preact","4.examples/vite-ssr-preact","i-logos-preact",{"title":352,"path":353,"stem":354,"icon":340},"SSR with React","/examples/vite-ssr-react","4.examples/vite-ssr-react",{"title":356,"path":357,"stem":358,"icon":359},"SSR with SolidJS","/examples/vite-ssr-solid","4.examples/vite-ssr-solid","i-logos-solidjs-icon",{"title":361,"path":362,"stem":363,"icon":364},"SSR with TanStack Router","/examples/vite-ssr-tsr-react","4.examples/vite-ssr-tsr-react","i-simple-icons-tanstack",{"title":366,"path":367,"stem":368,"icon":364},"SSR with TanStack Start","/examples/vite-ssr-tss-react","4.examples/vite-ssr-tss-react",{"title":370,"path":371,"stem":372,"icon":373},"SSR with Vue Router","/examples/vite-ssr-vue-router","4.examples/vite-ssr-vue-router","i-logos-vue",{"title":375,"path":376,"stem":377,"icon":378},"Vite + tRPC","/examples/vite-trpc","4.examples/vite-trpc","i-simple-icons-trpc",{"title":63,"path":380,"stem":381,"icon":382},"/examples/websocket","4.examples/websocket","i-lucide-radio",{"title":384,"path":385,"stem":386,"children":387},"Blog","/blog","9.blog",[388,391],{"title":384,"path":385,"stem":389,"icon":390},"9.blog/index","i-lucide-file-text",{"title":392,"path":393,"stem":394,"icon":390},"Nitro v3 Beta is here!","/blog/v3-beta","9.blog/1.v3-beta",{"title":5,"path":396,"stem":397},"/","index",{"id":399,"title":78,"body":400,"description":2164,"extension":2165,"meta":2166,"navigation":2167,"path":79,"seo":2168,"stem":80,"__hash__":2169},"content/1.docs/8.storage.md",{"type":401,"value":402,"toc":2147,"icon":81},"minimark",[403,415,420,428,680,683,688,694,917,938,1123,1126,1133,1136,1215,1222,1233,1237,1244,1247,1352,1361,1365,1368,1374,1384,1438,1442,1445,1493,1506,1509,1520,1528,1673,1677,1684,1758,1764,1842,1846,1849,1945,1951,1955,1961,2132,2143],[404,405,406,407,414],"p",{},"Nitro has built-in integration with ",[408,409,413],"a",{"href":410,"rel":411},"https://unstorage.unjs.io",[412],"nofollow","unstorage"," to provide a runtime agnostic persistent layer.",[416,417,419],"h2",{"id":418},"usage","Usage",[404,421,422,423,427],{},"To use the storage layer, you can use the ",[424,425,426],"code",{},"useStorage()"," utility to access the storage instance.",[429,430,434],"pre",{"className":431,"code":432,"language":433,"meta":5,"style":5},"language-ts shiki shiki-themes github-light github-dark github-dark","import { useStorage } from \"nitro/storage\";\n\n// Default storage (in-memory)\nawait useStorage().setItem(\"test:foo\", { hello: \"world\" });\nconst value = await useStorage().getItem(\"test:foo\");\n\n// You can specify a base prefix with useStorage(base)\nconst testStorage = useStorage(\"test\");\nawait testStorage.setItem(\"foo\", { hello: \"world\" });\nawait testStorage.getItem(\"foo\"); // { hello: \"world\" }\n\n// You can use generics to type the return value\nawait useStorage\u003C{ hello: string }>(\"test\").getItem(\"foo\");\nawait useStorage(\"test\").getItem\u003C{ hello: string }>(\"foo\");\n","ts",[424,435,436,459,466,473,504,534,539,545,564,585,604,609,615,651],{"__ignoreMap":5},[437,438,441,445,449,452,456],"span",{"class":439,"line":440},"line",1,[437,442,444],{"class":443},"so5gQ","import",[437,446,448],{"class":447},"slsVL"," { useStorage } ",[437,450,451],{"class":443},"from",[437,453,455],{"class":454},"sfrk1"," \"nitro/storage\"",[437,457,458],{"class":447},";\n",[437,460,462],{"class":439,"line":461},2,[437,463,465],{"emptyLinePlaceholder":464},true,"\n",[437,467,469],{"class":439,"line":468},3,[437,470,472],{"class":471},"sCsY4","// Default storage (in-memory)\n",[437,474,476,479,483,486,489,492,495,498,501],{"class":439,"line":475},4,[437,477,478],{"class":443},"await",[437,480,482],{"class":481},"shcOC"," useStorage",[437,484,485],{"class":447},"().",[437,487,488],{"class":481},"setItem",[437,490,491],{"class":447},"(",[437,493,494],{"class":454},"\"test:foo\"",[437,496,497],{"class":447},", { hello: ",[437,499,500],{"class":454},"\"world\"",[437,502,503],{"class":447}," });\n",[437,505,507,510,514,517,520,522,524,527,529,531],{"class":439,"line":506},5,[437,508,509],{"class":443},"const",[437,511,513],{"class":512},"suiK_"," value",[437,515,516],{"class":443}," =",[437,518,519],{"class":443}," await",[437,521,482],{"class":481},[437,523,485],{"class":447},[437,525,526],{"class":481},"getItem",[437,528,491],{"class":447},[437,530,494],{"class":454},[437,532,533],{"class":447},");\n",[437,535,537],{"class":439,"line":536},6,[437,538,465],{"emptyLinePlaceholder":464},[437,540,542],{"class":439,"line":541},7,[437,543,544],{"class":471},"// You can specify a base prefix with useStorage(base)\n",[437,546,548,550,553,555,557,559,562],{"class":439,"line":547},8,[437,549,509],{"class":443},[437,551,552],{"class":512}," testStorage",[437,554,516],{"class":443},[437,556,482],{"class":481},[437,558,491],{"class":447},[437,560,561],{"class":454},"\"test\"",[437,563,533],{"class":447},[437,565,567,569,572,574,576,579,581,583],{"class":439,"line":566},9,[437,568,478],{"class":443},[437,570,571],{"class":447}," testStorage.",[437,573,488],{"class":481},[437,575,491],{"class":447},[437,577,578],{"class":454},"\"foo\"",[437,580,497],{"class":447},[437,582,500],{"class":454},[437,584,503],{"class":447},[437,586,588,590,592,594,596,598,601],{"class":439,"line":587},10,[437,589,478],{"class":443},[437,591,571],{"class":447},[437,593,526],{"class":481},[437,595,491],{"class":447},[437,597,578],{"class":454},[437,599,600],{"class":447},"); ",[437,602,603],{"class":471},"// { hello: \"world\" }\n",[437,605,607],{"class":439,"line":606},11,[437,608,465],{"emptyLinePlaceholder":464},[437,610,612],{"class":439,"line":611},12,[437,613,614],{"class":471},"// You can use generics to type the return value\n",[437,616,618,620,622,625,629,632,635,638,640,643,645,647,649],{"class":439,"line":617},13,[437,619,478],{"class":443},[437,621,482],{"class":481},[437,623,624],{"class":447},"\u003C{ ",[437,626,628],{"class":627},"sQHwn","hello",[437,630,631],{"class":443},":",[437,633,634],{"class":512}," string",[437,636,637],{"class":447}," }>(",[437,639,561],{"class":454},[437,641,642],{"class":447},").",[437,644,526],{"class":481},[437,646,491],{"class":447},[437,648,578],{"class":454},[437,650,533],{"class":447},[437,652,654,656,658,660,662,664,666,668,670,672,674,676,678],{"class":439,"line":653},14,[437,655,478],{"class":443},[437,657,482],{"class":481},[437,659,491],{"class":447},[437,661,561],{"class":454},[437,663,642],{"class":447},[437,665,526],{"class":481},[437,667,624],{"class":447},[437,669,628],{"class":627},[437,671,631],{"class":443},[437,673,634],{"class":512},[437,675,637],{"class":447},[437,677,578],{"class":454},[437,679,533],{"class":447},[681,682],"read-more",{"to":410},[684,685,687],"h3",{"id":686},"available-methods","Available methods",[404,689,690,691,693],{},"The storage instance returned by ",[424,692,426],{}," provides the following methods:",[695,696,697,710],"table",{},[698,699,700],"thead",{},[701,702,703,707],"tr",{},[704,705,706],"th",{},"Method",[704,708,709],{},"Description",[711,712,713,728,742,752,762,775,785,795,805,815,825,845,855,865,875,885,907],"tbody",{},[701,714,715,721],{},[716,717,718],"td",{},[424,719,720],{},"getItem(key)",[716,722,723,724,727],{},"Get the value of a key. Returns ",[424,725,726],{},"null"," if the key does not exist.",[701,729,730,735],{},[716,731,732],{},[424,733,734],{},"getItems(items)",[716,736,737,738,741],{},"Get multiple items at once. Accepts an array of keys or ",[424,739,740],{},"{ key, options }"," objects.",[701,743,744,749],{},[716,745,746],{},[424,747,748],{},"getItemRaw(key)",[716,750,751],{},"Get the raw value of a key without parsing. Useful for binary data.",[701,753,754,759],{},[716,755,756],{},[424,757,758],{},"setItem(key, value)",[716,760,761],{},"Set the value of a key.",[701,763,764,769],{},[716,765,766],{},[424,767,768],{},"setItems(items)",[716,770,771,772,741],{},"Set multiple items at once. Accepts an array of ",[424,773,774],{},"{ key, value }",[701,776,777,782],{},[716,778,779],{},[424,780,781],{},"setItemRaw(key, value)",[716,783,784],{},"Set the raw value of a key without serialization.",[701,786,787,792],{},[716,788,789],{},[424,790,791],{},"hasItem(key)",[716,793,794],{},"Check if a key exists. Returns a boolean.",[701,796,797,802],{},[716,798,799],{},[424,800,801],{},"removeItem(key)",[716,803,804],{},"Remove a key from storage.",[701,806,807,812],{},[716,808,809],{},[424,810,811],{},"getKeys(base?)",[716,813,814],{},"Get all keys, optionally filtered by a base prefix.",[701,816,817,822],{},[716,818,819],{},[424,820,821],{},"clear(base?)",[716,823,824],{},"Clear all keys, optionally filtered by a base prefix.",[701,826,827,832],{},[716,828,829],{},[424,830,831],{},"getMeta(key)",[716,833,834,835,838,839,838,842,642],{},"Get metadata for a key (e.g., ",[424,836,837],{},"mtime",", ",[424,840,841],{},"atime",[424,843,844],{},"ttl",[701,846,847,852],{},[716,848,849],{},[424,850,851],{},"setMeta(key, meta)",[716,853,854],{},"Set metadata for a key.",[701,856,857,862],{},[716,858,859],{},[424,860,861],{},"removeMeta(key)",[716,863,864],{},"Remove metadata for a key.",[701,866,867,872],{},[716,868,869],{},[424,870,871],{},"mount(base, driver)",[716,873,874],{},"Dynamically mount a storage driver at a base path.",[701,876,877,882],{},[716,878,879],{},[424,880,881],{},"unmount(base)",[716,883,884],{},"Unmount a storage driver from a base path.",[701,886,887,892],{},[716,888,889],{},[424,890,891],{},"watch(callback)",[716,893,894,895,898,899,902,903,906],{},"Watch for changes. Callback receives ",[424,896,897],{},"(event, key)"," where event is ",[424,900,901],{},"\"update\""," or ",[424,904,905],{},"\"remove\"",".",[701,908,909,914],{},[716,910,911],{},[424,912,913],{},"unwatch()",[716,915,916],{},"Stop watching for changes.",[404,918,919,920,838,923,838,926,838,929,838,932,838,935,906],{},"Shorthand aliases are also available: ",[424,921,922],{},"get",[424,924,925],{},"set",[424,927,928],{},"has",[424,930,931],{},"del",[424,933,934],{},"remove",[424,936,937],{},"keys",[429,939,941],{"className":431,"code":940,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\n// Get all keys under a prefix\nconst keys = await useStorage(\"test\").getKeys();\n\n// Check if a key exists\nconst exists = await useStorage().hasItem(\"test:foo\");\n\n// Remove a key\nawait useStorage().removeItem(\"test:foo\");\n\n// Get raw binary data\nconst raw = await useStorage().getItemRaw(\"assets/server:image.png\");\n\n// Get metadata (type, etag, mtime, etc.)\nconst meta = await useStorage(\"assets/server\").getMeta(\"file.txt\");\n",[424,942,943,955,959,964,989,993,998,1022,1026,1031,1048,1052,1057,1082,1086,1092],{"__ignoreMap":5},[437,944,945,947,949,951,953],{"class":439,"line":440},[437,946,444],{"class":443},[437,948,448],{"class":447},[437,950,451],{"class":443},[437,952,455],{"class":454},[437,954,458],{"class":447},[437,956,957],{"class":439,"line":461},[437,958,465],{"emptyLinePlaceholder":464},[437,960,961],{"class":439,"line":468},[437,962,963],{"class":471},"// Get all keys under a prefix\n",[437,965,966,968,971,973,975,977,979,981,983,986],{"class":439,"line":475},[437,967,509],{"class":443},[437,969,970],{"class":512}," keys",[437,972,516],{"class":443},[437,974,519],{"class":443},[437,976,482],{"class":481},[437,978,491],{"class":447},[437,980,561],{"class":454},[437,982,642],{"class":447},[437,984,985],{"class":481},"getKeys",[437,987,988],{"class":447},"();\n",[437,990,991],{"class":439,"line":506},[437,992,465],{"emptyLinePlaceholder":464},[437,994,995],{"class":439,"line":536},[437,996,997],{"class":471},"// Check if a key exists\n",[437,999,1000,1002,1005,1007,1009,1011,1013,1016,1018,1020],{"class":439,"line":541},[437,1001,509],{"class":443},[437,1003,1004],{"class":512}," exists",[437,1006,516],{"class":443},[437,1008,519],{"class":443},[437,1010,482],{"class":481},[437,1012,485],{"class":447},[437,1014,1015],{"class":481},"hasItem",[437,1017,491],{"class":447},[437,1019,494],{"class":454},[437,1021,533],{"class":447},[437,1023,1024],{"class":439,"line":547},[437,1025,465],{"emptyLinePlaceholder":464},[437,1027,1028],{"class":439,"line":566},[437,1029,1030],{"class":471},"// Remove a key\n",[437,1032,1033,1035,1037,1039,1042,1044,1046],{"class":439,"line":587},[437,1034,478],{"class":443},[437,1036,482],{"class":481},[437,1038,485],{"class":447},[437,1040,1041],{"class":481},"removeItem",[437,1043,491],{"class":447},[437,1045,494],{"class":454},[437,1047,533],{"class":447},[437,1049,1050],{"class":439,"line":606},[437,1051,465],{"emptyLinePlaceholder":464},[437,1053,1054],{"class":439,"line":611},[437,1055,1056],{"class":471},"// Get raw binary data\n",[437,1058,1059,1061,1064,1066,1068,1070,1072,1075,1077,1080],{"class":439,"line":617},[437,1060,509],{"class":443},[437,1062,1063],{"class":512}," raw",[437,1065,516],{"class":443},[437,1067,519],{"class":443},[437,1069,482],{"class":481},[437,1071,485],{"class":447},[437,1073,1074],{"class":481},"getItemRaw",[437,1076,491],{"class":447},[437,1078,1079],{"class":454},"\"assets/server:image.png\"",[437,1081,533],{"class":447},[437,1083,1084],{"class":439,"line":653},[437,1085,465],{"emptyLinePlaceholder":464},[437,1087,1089],{"class":439,"line":1088},15,[437,1090,1091],{"class":471},"// Get metadata (type, etag, mtime, etc.)\n",[437,1093,1095,1097,1100,1102,1104,1106,1108,1111,1113,1116,1118,1121],{"class":439,"line":1094},16,[437,1096,509],{"class":443},[437,1098,1099],{"class":512}," meta",[437,1101,516],{"class":443},[437,1103,519],{"class":443},[437,1105,482],{"class":481},[437,1107,491],{"class":447},[437,1109,1110],{"class":454},"\"assets/server\"",[437,1112,642],{"class":447},[437,1114,1115],{"class":481},"getMeta",[437,1117,491],{"class":447},[437,1119,1120],{"class":454},"\"file.txt\"",[437,1122,533],{"class":447},[416,1124,33],{"id":1125},"configuration",[404,1127,1128,1129,1132],{},"You can mount one or multiple custom storage drivers using the ",[424,1130,1131],{},"storage"," option.",[404,1134,1135],{},"The key is the mount point name, and the value is the driver name and configuration.",[429,1137,1140],{"className":431,"code":1138,"filename":1139,"language":433,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  storage: {\n    redis: {\n      driver: \"redis\",\n      /* redis connector options */\n    }\n  }\n})\n","nitro.config.ts",[424,1141,1142,1156,1160,1174,1179,1184,1195,1200,1205,1210],{"__ignoreMap":5},[437,1143,1144,1146,1149,1151,1154],{"class":439,"line":440},[437,1145,444],{"class":443},[437,1147,1148],{"class":447}," { defineConfig } ",[437,1150,451],{"class":443},[437,1152,1153],{"class":454}," \"nitro\"",[437,1155,458],{"class":447},[437,1157,1158],{"class":439,"line":461},[437,1159,465],{"emptyLinePlaceholder":464},[437,1161,1162,1165,1168,1171],{"class":439,"line":468},[437,1163,1164],{"class":443},"export",[437,1166,1167],{"class":443}," default",[437,1169,1170],{"class":481}," defineConfig",[437,1172,1173],{"class":447},"({\n",[437,1175,1176],{"class":439,"line":475},[437,1177,1178],{"class":447},"  storage: {\n",[437,1180,1181],{"class":439,"line":506},[437,1182,1183],{"class":447},"    redis: {\n",[437,1185,1186,1189,1192],{"class":439,"line":536},[437,1187,1188],{"class":447},"      driver: ",[437,1190,1191],{"class":454},"\"redis\"",[437,1193,1194],{"class":447},",\n",[437,1196,1197],{"class":439,"line":541},[437,1198,1199],{"class":471},"      /* redis connector options */\n",[437,1201,1202],{"class":439,"line":547},[437,1203,1204],{"class":447},"    }\n",[437,1206,1207],{"class":439,"line":566},[437,1208,1209],{"class":447},"  }\n",[437,1211,1212],{"class":439,"line":587},[437,1213,1214],{"class":447},"})\n",[404,1216,1217,1218,1221],{},"Then, you can use the redis storage using the ",[424,1219,1220],{},"useStorage(\"redis\")"," function.",[681,1223,1225],{"to":1224},"https://unstorage.unjs.io/",[404,1226,1227,1228,1232],{},"You can find the driver list on ",[408,1229,1231],{"href":1224,"rel":1230},[412],"unstorage documentation"," with their configuration.",[684,1234,1236],{"id":1235},"development-storage","Development storage",[404,1238,1239,1240,1243],{},"You can use the ",[424,1241,1242],{},"devStorage"," option to override storage configuration during development and prerendering.",[404,1245,1246],{},"This is useful when your production driver is not available in development (e.g., a managed Redis instance).",[429,1248,1250],{"className":431,"code":1249,"filename":1139,"language":433,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  storage: {\n    db: {\n      driver: \"redis\",\n      host: \"prod.example.com\",\n    }\n  },\n  devStorage: {\n    db: {\n      driver: \"fs\",\n      base: \"./.data/db\"\n    }\n  }\n})\n",[424,1251,1252,1264,1268,1278,1282,1287,1295,1305,1309,1314,1319,1323,1332,1340,1344,1348],{"__ignoreMap":5},[437,1253,1254,1256,1258,1260,1262],{"class":439,"line":440},[437,1255,444],{"class":443},[437,1257,1148],{"class":447},[437,1259,451],{"class":443},[437,1261,1153],{"class":454},[437,1263,458],{"class":447},[437,1265,1266],{"class":439,"line":461},[437,1267,465],{"emptyLinePlaceholder":464},[437,1269,1270,1272,1274,1276],{"class":439,"line":468},[437,1271,1164],{"class":443},[437,1273,1167],{"class":443},[437,1275,1170],{"class":481},[437,1277,1173],{"class":447},[437,1279,1280],{"class":439,"line":475},[437,1281,1178],{"class":447},[437,1283,1284],{"class":439,"line":506},[437,1285,1286],{"class":447},"    db: {\n",[437,1288,1289,1291,1293],{"class":439,"line":536},[437,1290,1188],{"class":447},[437,1292,1191],{"class":454},[437,1294,1194],{"class":447},[437,1296,1297,1300,1303],{"class":439,"line":541},[437,1298,1299],{"class":447},"      host: ",[437,1301,1302],{"class":454},"\"prod.example.com\"",[437,1304,1194],{"class":447},[437,1306,1307],{"class":439,"line":547},[437,1308,1204],{"class":447},[437,1310,1311],{"class":439,"line":566},[437,1312,1313],{"class":447},"  },\n",[437,1315,1316],{"class":439,"line":587},[437,1317,1318],{"class":447},"  devStorage: {\n",[437,1320,1321],{"class":439,"line":606},[437,1322,1286],{"class":447},[437,1324,1325,1327,1330],{"class":439,"line":611},[437,1326,1188],{"class":447},[437,1328,1329],{"class":454},"\"fs\"",[437,1331,1194],{"class":447},[437,1333,1334,1337],{"class":439,"line":617},[437,1335,1336],{"class":447},"      base: ",[437,1338,1339],{"class":454},"\"./.data/db\"\n",[437,1341,1342],{"class":439,"line":653},[437,1343,1204],{"class":447},[437,1345,1346],{"class":439,"line":1088},[437,1347,1209],{"class":447},[437,1349,1350],{"class":439,"line":1094},[437,1351,1214],{"class":447},[404,1353,1354,1355,1357,1358,1360],{},"When running in development mode, ",[424,1356,1242],{}," mounts are merged on top of ",[424,1359,1131],{}," mounts, allowing you to use a local filesystem driver or an in-memory driver while developing.",[416,1362,1364],{"id":1363},"built-in-mount-points","Built-in mount points",[404,1366,1367],{},"Nitro automatically mounts the following storage paths:",[684,1369,1371],{"id":1370},"assets",[424,1372,1373],{},"/assets",[404,1375,1376,1377,1379,1380,642],{},"Server assets are mounted at the ",[424,1378,1373],{}," base path. This mount point provides read-only access to bundled server assets (see ",[408,1381,1383],{"href":1382},"#server-assets","Server assets",[429,1385,1387],{"className":431,"code":1386,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\n// Access server assets via the /assets mount\nconst content = await useStorage(\"assets/server\").getItem(\"my-file.txt\");\n",[424,1388,1389,1401,1405,1410],{"__ignoreMap":5},[437,1390,1391,1393,1395,1397,1399],{"class":439,"line":440},[437,1392,444],{"class":443},[437,1394,448],{"class":447},[437,1396,451],{"class":443},[437,1398,455],{"class":454},[437,1400,458],{"class":447},[437,1402,1403],{"class":439,"line":461},[437,1404,465],{"emptyLinePlaceholder":464},[437,1406,1407],{"class":439,"line":468},[437,1408,1409],{"class":471},"// Access server assets via the /assets mount\n",[437,1411,1412,1414,1417,1419,1421,1423,1425,1427,1429,1431,1433,1436],{"class":439,"line":475},[437,1413,509],{"class":443},[437,1415,1416],{"class":512}," content",[437,1418,516],{"class":443},[437,1420,519],{"class":443},[437,1422,482],{"class":481},[437,1424,491],{"class":447},[437,1426,1110],{"class":454},[437,1428,642],{"class":447},[437,1430,526],{"class":481},[437,1432,491],{"class":447},[437,1434,1435],{"class":454},"\"my-file.txt\"",[437,1437,533],{"class":447},[684,1439,1441],{"id":1440},"default-in-memory","Default (in-memory)",[404,1443,1444],{},"The root storage (without a base path) uses an in-memory driver by default. Data stored here is not persisted across restarts.",[429,1446,1448],{"className":431,"code":1447,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\n// In-memory by default, not persisted\nawait useStorage().setItem(\"counter\", 1);\n",[424,1449,1450,1462,1466,1471],{"__ignoreMap":5},[437,1451,1452,1454,1456,1458,1460],{"class":439,"line":440},[437,1453,444],{"class":443},[437,1455,448],{"class":447},[437,1457,451],{"class":443},[437,1459,455],{"class":454},[437,1461,458],{"class":447},[437,1463,1464],{"class":439,"line":461},[437,1465,465],{"emptyLinePlaceholder":464},[437,1467,1468],{"class":439,"line":468},[437,1469,1470],{"class":471},"// In-memory by default, not persisted\n",[437,1472,1473,1475,1477,1479,1481,1483,1486,1488,1491],{"class":439,"line":475},[437,1474,478],{"class":443},[437,1476,482],{"class":481},[437,1478,485],{"class":447},[437,1480,488],{"class":481},[437,1482,491],{"class":447},[437,1484,1485],{"class":454},"\"counter\"",[437,1487,838],{"class":447},[437,1489,1490],{"class":512},"1",[437,1492,533],{"class":447},[404,1494,1495,1496,838,1499,1502,1503,1505],{},"To persist data, mount a driver with a persistent backend (e.g., ",[424,1497,1498],{},"fs",[424,1500,1501],{},"redis",", etc.) using the ",[424,1504,1131],{}," configuration option.",[416,1507,1383],{"id":1508},"server-assets",[404,1510,1511,1512,1515,1516,1519],{},"Nitro allows you to bundle files from an ",[424,1513,1514],{},"assets/"," directory at the root of your project. These files are accessible at runtime via the ",[424,1517,1518],{},"assets/server"," storage mount.",[429,1521,1526],{"className":1522,"code":1524,"language":1525},[1523],"language-text","my-project/\n  assets/\n    data.json\n    templates/\n      welcome.html\n  server/\n    routes/\n      index.ts\n","text",[424,1527,1524],{"__ignoreMap":5},[429,1529,1532],{"className":431,"code":1530,"filename":1531,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\nexport default defineHandler(async () => {\n  const serverAssets = useStorage(\"assets/server\");\n\n  const keys = await serverAssets.getKeys();\n  const data = await serverAssets.getItem(\"data.json\");\n  const template = await serverAssets.getItem(\"templates/welcome.html\");\n\n  return { keys, data, template };\n});\n","server/routes/index.ts",[424,1533,1534,1546,1550,1573,1591,1595,1612,1634,1656,1660,1668],{"__ignoreMap":5},[437,1535,1536,1538,1540,1542,1544],{"class":439,"line":440},[437,1537,444],{"class":443},[437,1539,448],{"class":447},[437,1541,451],{"class":443},[437,1543,455],{"class":454},[437,1545,458],{"class":447},[437,1547,1548],{"class":439,"line":461},[437,1549,465],{"emptyLinePlaceholder":464},[437,1551,1552,1554,1556,1559,1561,1564,1567,1570],{"class":439,"line":468},[437,1553,1164],{"class":443},[437,1555,1167],{"class":443},[437,1557,1558],{"class":481}," defineHandler",[437,1560,491],{"class":447},[437,1562,1563],{"class":443},"async",[437,1565,1566],{"class":447}," () ",[437,1568,1569],{"class":443},"=>",[437,1571,1572],{"class":447}," {\n",[437,1574,1575,1578,1581,1583,1585,1587,1589],{"class":439,"line":475},[437,1576,1577],{"class":443},"  const",[437,1579,1580],{"class":512}," serverAssets",[437,1582,516],{"class":443},[437,1584,482],{"class":481},[437,1586,491],{"class":447},[437,1588,1110],{"class":454},[437,1590,533],{"class":447},[437,1592,1593],{"class":439,"line":506},[437,1594,465],{"emptyLinePlaceholder":464},[437,1596,1597,1599,1601,1603,1605,1608,1610],{"class":439,"line":536},[437,1598,1577],{"class":443},[437,1600,970],{"class":512},[437,1602,516],{"class":443},[437,1604,519],{"class":443},[437,1606,1607],{"class":447}," serverAssets.",[437,1609,985],{"class":481},[437,1611,988],{"class":447},[437,1613,1614,1616,1619,1621,1623,1625,1627,1629,1632],{"class":439,"line":541},[437,1615,1577],{"class":443},[437,1617,1618],{"class":512}," data",[437,1620,516],{"class":443},[437,1622,519],{"class":443},[437,1624,1607],{"class":447},[437,1626,526],{"class":481},[437,1628,491],{"class":447},[437,1630,1631],{"class":454},"\"data.json\"",[437,1633,533],{"class":447},[437,1635,1636,1638,1641,1643,1645,1647,1649,1651,1654],{"class":439,"line":547},[437,1637,1577],{"class":443},[437,1639,1640],{"class":512}," template",[437,1642,516],{"class":443},[437,1644,519],{"class":443},[437,1646,1607],{"class":447},[437,1648,526],{"class":481},[437,1650,491],{"class":447},[437,1652,1653],{"class":454},"\"templates/welcome.html\"",[437,1655,533],{"class":447},[437,1657,1658],{"class":439,"line":566},[437,1659,465],{"emptyLinePlaceholder":464},[437,1661,1662,1665],{"class":439,"line":587},[437,1663,1664],{"class":443},"  return",[437,1666,1667],{"class":447}," { keys, data, template };\n",[437,1669,1670],{"class":439,"line":606},[437,1671,1672],{"class":447},"});\n",[684,1674,1676],{"id":1675},"custom-asset-directories","Custom asset directories",[404,1678,1679,1680,1683],{},"You can register additional asset directories using the ",[424,1681,1682],{},"serverAssets"," config option:",[429,1685,1687],{"className":431,"code":1686,"filename":1139,"language":433,"meta":5,"style":5},"import { defineConfig } from \"nitro\";\n\nexport default defineConfig({\n  serverAssets: [\n    {\n      baseName: \"templates\",\n      dir: \"./templates\",\n    }\n  ]\n})\n",[424,1688,1689,1701,1705,1715,1720,1725,1735,1745,1749,1754],{"__ignoreMap":5},[437,1690,1691,1693,1695,1697,1699],{"class":439,"line":440},[437,1692,444],{"class":443},[437,1694,1148],{"class":447},[437,1696,451],{"class":443},[437,1698,1153],{"class":454},[437,1700,458],{"class":447},[437,1702,1703],{"class":439,"line":461},[437,1704,465],{"emptyLinePlaceholder":464},[437,1706,1707,1709,1711,1713],{"class":439,"line":468},[437,1708,1164],{"class":443},[437,1710,1167],{"class":443},[437,1712,1170],{"class":481},[437,1714,1173],{"class":447},[437,1716,1717],{"class":439,"line":475},[437,1718,1719],{"class":447},"  serverAssets: [\n",[437,1721,1722],{"class":439,"line":506},[437,1723,1724],{"class":447},"    {\n",[437,1726,1727,1730,1733],{"class":439,"line":536},[437,1728,1729],{"class":447},"      baseName: ",[437,1731,1732],{"class":454},"\"templates\"",[437,1734,1194],{"class":447},[437,1736,1737,1740,1743],{"class":439,"line":541},[437,1738,1739],{"class":447},"      dir: ",[437,1741,1742],{"class":454},"\"./templates\"",[437,1744,1194],{"class":447},[437,1746,1747],{"class":439,"line":547},[437,1748,1204],{"class":447},[437,1750,1751],{"class":439,"line":566},[437,1752,1753],{"class":447},"  ]\n",[437,1755,1756],{"class":439,"line":587},[437,1757,1214],{"class":447},[404,1759,1760,1761,631],{},"Custom asset directories are accessible under ",[424,1762,1763],{},"assets/\u003CbaseName>",[429,1765,1767],{"className":431,"code":1766,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\nconst templates = useStorage(\"assets/templates\");\nconst keys = await templates.getKeys();\nconst html = await templates.getItem(\"email.html\");\n",[424,1768,1769,1781,1785,1803,1820],{"__ignoreMap":5},[437,1770,1771,1773,1775,1777,1779],{"class":439,"line":440},[437,1772,444],{"class":443},[437,1774,448],{"class":447},[437,1776,451],{"class":443},[437,1778,455],{"class":454},[437,1780,458],{"class":447},[437,1782,1783],{"class":439,"line":461},[437,1784,465],{"emptyLinePlaceholder":464},[437,1786,1787,1789,1792,1794,1796,1798,1801],{"class":439,"line":468},[437,1788,509],{"class":443},[437,1790,1791],{"class":512}," templates",[437,1793,516],{"class":443},[437,1795,482],{"class":481},[437,1797,491],{"class":447},[437,1799,1800],{"class":454},"\"assets/templates\"",[437,1802,533],{"class":447},[437,1804,1805,1807,1809,1811,1813,1816,1818],{"class":439,"line":475},[437,1806,509],{"class":443},[437,1808,970],{"class":512},[437,1810,516],{"class":443},[437,1812,519],{"class":443},[437,1814,1815],{"class":447}," templates.",[437,1817,985],{"class":481},[437,1819,988],{"class":447},[437,1821,1822,1824,1827,1829,1831,1833,1835,1837,1840],{"class":439,"line":506},[437,1823,509],{"class":443},[437,1825,1826],{"class":512}," html",[437,1828,516],{"class":443},[437,1830,519],{"class":443},[437,1832,1815],{"class":447},[437,1834,526],{"class":481},[437,1836,491],{"class":447},[437,1838,1839],{"class":454},"\"email.html\"",[437,1841,533],{"class":447},[684,1843,1845],{"id":1844},"asset-metadata","Asset metadata",[404,1847,1848],{},"Server assets include metadata such as content type, ETag, and modification time:",[429,1850,1852],{"className":431,"code":1851,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\n\nconst serverAssets = useStorage(\"assets/server\");\n\nconst meta = await serverAssets.getMeta(\"image.png\");\n// { type: \"image/png\", etag: \"\\\"...\\\"\", mtime: \"2024-01-01T00:00:00.000Z\" }\n\n// Useful for setting response headers\nconst raw = await serverAssets.getItemRaw(\"image.png\");\n",[424,1853,1854,1866,1870,1886,1890,1911,1916,1920,1925],{"__ignoreMap":5},[437,1855,1856,1858,1860,1862,1864],{"class":439,"line":440},[437,1857,444],{"class":443},[437,1859,448],{"class":447},[437,1861,451],{"class":443},[437,1863,455],{"class":454},[437,1865,458],{"class":447},[437,1867,1868],{"class":439,"line":461},[437,1869,465],{"emptyLinePlaceholder":464},[437,1871,1872,1874,1876,1878,1880,1882,1884],{"class":439,"line":468},[437,1873,509],{"class":443},[437,1875,1580],{"class":512},[437,1877,516],{"class":443},[437,1879,482],{"class":481},[437,1881,491],{"class":447},[437,1883,1110],{"class":454},[437,1885,533],{"class":447},[437,1887,1888],{"class":439,"line":475},[437,1889,465],{"emptyLinePlaceholder":464},[437,1891,1892,1894,1896,1898,1900,1902,1904,1906,1909],{"class":439,"line":506},[437,1893,509],{"class":443},[437,1895,1099],{"class":512},[437,1897,516],{"class":443},[437,1899,519],{"class":443},[437,1901,1607],{"class":447},[437,1903,1115],{"class":481},[437,1905,491],{"class":447},[437,1907,1908],{"class":454},"\"image.png\"",[437,1910,533],{"class":447},[437,1912,1913],{"class":439,"line":536},[437,1914,1915],{"class":471},"// { type: \"image/png\", etag: \"\\\"...\\\"\", mtime: \"2024-01-01T00:00:00.000Z\" }\n",[437,1917,1918],{"class":439,"line":541},[437,1919,465],{"emptyLinePlaceholder":464},[437,1921,1922],{"class":439,"line":547},[437,1923,1924],{"class":471},"// Useful for setting response headers\n",[437,1926,1927,1929,1931,1933,1935,1937,1939,1941,1943],{"class":439,"line":566},[437,1928,509],{"class":443},[437,1930,1063],{"class":512},[437,1932,516],{"class":443},[437,1934,519],{"class":443},[437,1936,1607],{"class":447},[437,1938,1074],{"class":481},[437,1940,491],{"class":447},[437,1942,1908],{"class":454},[437,1944,533],{"class":447},[1946,1947,1948],"note",{},[404,1949,1950],{},"In development, server assets are read directly from the filesystem. In production, they are bundled and inlined into the build output.",[416,1952,1954],{"id":1953},"runtime-configuration","Runtime configuration",[404,1956,1957,1958,906],{},"In scenarios where the mount point configuration is not known until runtime, Nitro can dynamically add mount points during startup using ",[408,1959,1960],{"href":54},"plugins",[429,1962,1965],{"className":431,"code":1963,"filename":1964,"language":433,"meta":5,"style":5},"import { useStorage } from \"nitro/storage\";\nimport { definePlugin } from \"nitro\";\nimport redisDriver from \"unstorage/drivers/redis\";\n\nexport default definePlugin(() => {\n  const storage = useStorage()\n\n  // Dynamically pass in credentials from runtime configuration, or other sources\n  const driver = redisDriver({\n    base: \"redis\",\n    host: process.env.REDIS_HOST,\n    port: process.env.REDIS_PORT,\n    /* other redis connector options */\n  })\n\n  // Mount driver\n  storage.mount(\"redis\", driver)\n})\n","plugins/storage.ts",[424,1966,1967,1979,1992,2006,2010,2026,2040,2044,2049,2063,2072,2082,2092,2097,2102,2106,2111,2127],{"__ignoreMap":5},[437,1968,1969,1971,1973,1975,1977],{"class":439,"line":440},[437,1970,444],{"class":443},[437,1972,448],{"class":447},[437,1974,451],{"class":443},[437,1976,455],{"class":454},[437,1978,458],{"class":447},[437,1980,1981,1983,1986,1988,1990],{"class":439,"line":461},[437,1982,444],{"class":443},[437,1984,1985],{"class":447}," { definePlugin } ",[437,1987,451],{"class":443},[437,1989,1153],{"class":454},[437,1991,458],{"class":447},[437,1993,1994,1996,1999,2001,2004],{"class":439,"line":468},[437,1995,444],{"class":443},[437,1997,1998],{"class":447}," redisDriver ",[437,2000,451],{"class":443},[437,2002,2003],{"class":454}," \"unstorage/drivers/redis\"",[437,2005,458],{"class":447},[437,2007,2008],{"class":439,"line":475},[437,2009,465],{"emptyLinePlaceholder":464},[437,2011,2012,2014,2016,2019,2022,2024],{"class":439,"line":506},[437,2013,1164],{"class":443},[437,2015,1167],{"class":443},[437,2017,2018],{"class":481}," definePlugin",[437,2020,2021],{"class":447},"(() ",[437,2023,1569],{"class":443},[437,2025,1572],{"class":447},[437,2027,2028,2030,2033,2035,2037],{"class":439,"line":536},[437,2029,1577],{"class":443},[437,2031,2032],{"class":512}," storage",[437,2034,516],{"class":443},[437,2036,482],{"class":481},[437,2038,2039],{"class":447},"()\n",[437,2041,2042],{"class":439,"line":541},[437,2043,465],{"emptyLinePlaceholder":464},[437,2045,2046],{"class":439,"line":547},[437,2047,2048],{"class":471},"  // Dynamically pass in credentials from runtime configuration, or other sources\n",[437,2050,2051,2053,2056,2058,2061],{"class":439,"line":566},[437,2052,1577],{"class":443},[437,2054,2055],{"class":512}," driver",[437,2057,516],{"class":443},[437,2059,2060],{"class":481}," redisDriver",[437,2062,1173],{"class":447},[437,2064,2065,2068,2070],{"class":439,"line":587},[437,2066,2067],{"class":447},"    base: ",[437,2069,1191],{"class":454},[437,2071,1194],{"class":447},[437,2073,2074,2077,2080],{"class":439,"line":606},[437,2075,2076],{"class":447},"    host: process.env.",[437,2078,2079],{"class":512},"REDIS_HOST",[437,2081,1194],{"class":447},[437,2083,2084,2087,2090],{"class":439,"line":611},[437,2085,2086],{"class":447},"    port: process.env.",[437,2088,2089],{"class":512},"REDIS_PORT",[437,2091,1194],{"class":447},[437,2093,2094],{"class":439,"line":617},[437,2095,2096],{"class":471},"    /* other redis connector options */\n",[437,2098,2099],{"class":439,"line":653},[437,2100,2101],{"class":447},"  })\n",[437,2103,2104],{"class":439,"line":1088},[437,2105,465],{"emptyLinePlaceholder":464},[437,2107,2108],{"class":439,"line":1094},[437,2109,2110],{"class":471},"  // Mount driver\n",[437,2112,2114,2117,2120,2122,2124],{"class":439,"line":2113},17,[437,2115,2116],{"class":447},"  storage.",[437,2118,2119],{"class":481},"mount",[437,2121,491],{"class":447},[437,2123,1191],{"class":454},[437,2125,2126],{"class":447},", driver)\n",[437,2128,2130],{"class":439,"line":2129},18,[437,2131,1214],{"class":447},[2133,2134,2135],"warning",{},[404,2136,2137,2138,906],{},"This is a temporary workaround, with a better solution coming in the future! Keep a lookout on the GitHub issue ",[408,2139,2142],{"href":2140,"rel":2141},"https://github.com/nitrojs/nitro/issues/1161#issuecomment-1511444675",[412],"here",[2144,2145,2146],"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 .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}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":5,"searchDepth":461,"depth":461,"links":2148},[2149,2152,2155,2159,2163],{"id":418,"depth":461,"text":419,"children":2150},[2151],{"id":686,"depth":468,"text":687},{"id":1125,"depth":461,"text":33,"children":2153},[2154],{"id":1235,"depth":468,"text":1236},{"id":1363,"depth":461,"text":1364,"children":2156},[2157,2158],{"id":1370,"depth":468,"text":1373},{"id":1440,"depth":468,"text":1441},{"id":1508,"depth":461,"text":1383,"children":2160},[2161,2162],{"id":1675,"depth":468,"text":1676},{"id":1844,"depth":468,"text":1845},{"id":1953,"depth":461,"text":1954},"Nitro provides a built-in storage layer that can abstract filesystem or database or any other data source.","md",{"icon":81},{"icon":81},{"title":78,"description":2164},"SHu3JYDGQQY382lW4dUig42iFMhF5cg-A6Xa_gFPX-s",[2171,2173],{"title":73,"path":74,"stem":75,"description":2172,"icon":76,"children":-1},"Nitro provides a caching system built on top of the storage layer, powered by ocache.",{"title":83,"path":84,"stem":85,"description":5,"icon":86,"children":-1},1776114764736]