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