[{"data":1,"prerenderedAt":677},["ShallowReactive",2],{"navigation":3,"/docs/kv":137,"/docs/kv-surround":672},[4,123],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":113},"Docs","i-lucide-book","/docs","docs",[10,34,58,73,84,95,114],{"title":11,"path":12,"stem":13,"children":14,"icon":33},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[15,17,21,25,29],{"title":16,"path":12,"stem":13},"Introduction",{"title":18,"path":19,"stem":20},"Installation","/docs/getting-started/installation","docs/1.getting-started/2.installation",{"title":22,"path":23,"stem":24},"Deploy","/docs/getting-started/deploy","docs/1.getting-started/3.deploy",{"title":26,"path":27,"stem":28},"Migration","/docs/getting-started/migration","docs/1.getting-started/4.migration",{"title":30,"path":31,"stem":32},"Environments","/docs/getting-started/environments","docs/1.getting-started/5.environments","i-lucide-rocket",{"title":35,"path":36,"stem":37,"children":38,"icon":57},"Database","/docs/database","docs/2.database/1.index",[39,41,45,49,53],{"title":40,"path":36,"stem":37},"Setup",{"title":42,"path":43,"stem":44},"Schema","/docs/database/schema","docs/2.database/2.schema",{"title":46,"path":47,"stem":48},"Queries","/docs/database/query","docs/2.database/3.query",{"title":50,"path":51,"stem":52},"Migrations","/docs/database/migrations","docs/2.database/4.migrations",{"title":54,"path":55,"stem":56},"CLI","/docs/database/cli","docs/2.database/cli","i-lucide-database",{"title":59,"path":60,"stem":61,"children":62,"icon":72},"Blob","/docs/blob","docs/3.blob/1.index",[63,64,68],{"title":40,"path":60,"stem":61},{"title":65,"path":66,"stem":67},"Upload","/docs/blob/upload","docs/3.blob/2.upload",{"title":69,"path":70,"stem":71},"Blob SDK","/docs/blob/usage","docs/3.blob/3.usage","i-lucide-shapes",{"title":74,"path":75,"stem":76,"children":77,"icon":83},"Key Value","/docs/kv","docs/4.kv/1.index",[78,79],{"title":40,"path":75,"stem":76},{"title":80,"path":81,"stem":82},"KV SDK","/docs/kv/usage","docs/4.kv/2.usage","i-lucide-list",{"title":85,"path":86,"stem":87,"children":88,"icon":94},"Cache","/docs/cache","docs/5.cache/1.index",[89,90],{"title":40,"path":86,"stem":87},{"title":91,"path":92,"stem":93},"Usage","/docs/cache/usage","docs/5.cache/2.usage","i-lucide-zap",{"title":96,"icon":97,"path":98,"stem":99,"children":100,"page":113},"Guides","i-lucide-book-text","/docs/guides","docs/6.guides",[101,105,109],{"title":102,"path":103,"stem":104},"Pre-rendering","/docs/guides/pre-rendering","docs/6.guides/1.pre-rendering",{"title":106,"path":107,"stem":108},"Realtime","/docs/guides/realtime","docs/6.guides/2.realtime",{"title":110,"path":111,"stem":112},"CI/CD","/docs/guides/ci-cd","docs/6.guides/3.ci-cd",false,{"title":115,"path":116,"stem":117,"children":118,"page":113},"Reference","/docs/reference","docs/7.reference",[119],{"title":120,"path":121,"stem":122},"Environment Variables","/docs/reference/environment-variables","docs/7.reference/1.environment-variables",{"title":124,"icon":125,"path":126,"stem":127,"children":128,"page":113},"Changelog","i-lucide-megaphone","/changelog","changelog",[129,133],{"title":130,"path":131,"stem":132},"NuxtHub Multi-Vendor is now available","/changelog/nuxthub-multi-vendor","changelog/nuxthub-multi-vendor",{"title":134,"path":135,"stem":136},"Self-Hosting First & Cloud-Agnostic Future","/changelog/self-hosting-first","changelog/self-hosting-first",{"id":138,"title":40,"body":139,"description":665,"extension":666,"links":667,"meta":668,"navigation":669,"path":75,"seo":670,"stem":76,"__hash__":671},"docs/docs/4.kv/1.index.md",{"type":140,"value":141,"toc":659},"minimark",[142,160,164,180,253,258,261,530,541,545,557,565,650,655],[143,144,145,146,153,154,159],"p",{},"NuxtHub Key Value Storage automatically configures ",[147,148,152],"a",{"href":149,"rel":150},"https://nitro.build/guide/storage",[151],"nofollow","Nitro Storage",", which is built on ",[147,155,158],{"href":156,"rel":157},"https://unstorage.unjs.io/",[151],"unstorage",".",[161,162,11],"h2",{"id":163},"getting-started",[143,165,166,167,171,172,175,176,179],{},"Enable the key-value storage in your NuxtHub project by adding the ",[168,169,170],"code",{},"kv"," property to the ",[168,173,174],{},"hub"," object in your ",[168,177,178],{},"nuxt.config.ts"," file.",[181,182,187],"pre",{"className":183,"code":184,"filename":178,"language":185,"meta":186,"style":186},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  hub: {\n    kv: true\n  }\n})\n","ts","",[168,188,189,213,226,238,244],{"__ignoreMap":186},[190,191,194,198,201,205,209],"span",{"class":192,"line":193},"line",1,[190,195,197],{"class":196},"s7zQu","export",[190,199,200],{"class":196}," default",[190,202,204],{"class":203},"s2Zo4"," defineNuxtConfig",[190,206,208],{"class":207},"sTEyZ","(",[190,210,212],{"class":211},"sMK4o","{\n",[190,214,216,220,223],{"class":192,"line":215},2,[190,217,219],{"class":218},"swJcz","  hub",[190,221,222],{"class":211},":",[190,224,225],{"class":211}," {\n",[190,227,229,232,234],{"class":192,"line":228},3,[190,230,231],{"class":218},"    kv",[190,233,222],{"class":211},[190,235,237],{"class":236},"sfNiH"," true\n",[190,239,241],{"class":192,"line":240},4,[190,242,243],{"class":211},"  }\n",[190,245,247,250],{"class":192,"line":246},5,[190,248,249],{"class":211},"}",[190,251,252],{"class":207},")\n",[254,255,257],"h3",{"id":256},"automatic-configuration","Automatic Configuration",[143,259,260],{},"When building the Nuxt app, NuxtHub automatically configures the key-value storage driver on many providers.",[262,263,265,334,378,481,490],"tabs",{"sync":264},"provider",[266,267,270,281,284,293,322],"tabs-item",{"icon":268,"label":269},"i-simple-icons-upstash","Upstash",[271,272,273],"ol",{},[274,275,276,277,280],"li",{},"Install the ",[168,278,279],{},"@upstash/redis"," package",[282,283],"pm-install",{"name":279},[271,285,286],{"start":215},[274,287,288,289,292],{},"Set the ",[168,290,291],{},"UPSTASH_REDIS_REST_URL"," environment variable to your Upstash Redis REST URL.",[181,294,299],{"className":295,"code":296,"filename":297,"language":298,"meta":186,"style":186},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","UPSTASH_REDIS_REST_URL=https://...\nUPSTASH_REDIS_REST_TOKEN=...\n",".env","bash",[168,300,301,312],{"__ignoreMap":186},[190,302,303,305,308],{"class":192,"line":193},[190,304,291],{"class":207},[190,306,307],{"class":211},"=",[190,309,311],{"class":310},"sfazB","https://...\n",[190,313,314,317,319],{"class":192,"line":215},[190,315,316],{"class":207},"UPSTASH_REDIS_REST_TOKEN",[190,318,307],{"class":211},[190,320,321],{"class":310},"...\n",[323,324,325,326,329,330,333],"tip",{},"When deploying to Vercel, we automatically detect if ",[168,327,328],{},"KV_REST_API_URL"," and ",[168,331,332],{},"KV_REST_API_TOKEN"," environment variables are set, and use them to configure the Upstash Redis connection.",[266,335,338,345,347,355,369],{"icon":336,"label":337},"i-simple-icons-redis","Redis",[271,339,340],{},[274,341,276,342,280],{},[168,343,344],{},"ioredis",[282,346],{"name":344},[271,348,349],{"start":215},[274,350,288,351,354],{},[168,352,353],{},"REDIS_URL"," environment variable to your Redis connection URL.",[181,356,358],{"className":295,"code":357,"filename":297,"language":298,"meta":186,"style":186},"REDIS_URL=redis://localhost:6379\n",[168,359,360],{"__ignoreMap":186},[190,361,362,364,366],{"class":192,"line":193},[190,363,353],{"class":207},[190,365,307],{"class":211},[190,367,368],{"class":310},"redis://localhost:6379\n",[323,370,325,371,373,374,377],{},[168,372,353],{}," or ",[168,375,376],{},"KV_URL"," environment variable are set, and use one of them to configure the Redis connection.",[266,379,382,391,476],{"icon":380,"label":381},"i-simple-icons-cloudflare","Cloudflare KV",[143,383,384,385,390],{},"When deploying to Cloudflare, configure ",[147,386,389],{"href":387,"rel":388},"https://developers.cloudflare.com/kv/",[151],"Cloudflare Workers KV"," by providing the namespace ID. NuxtHub auto-generates the wrangler bindings at build time.",[181,392,394],{"className":183,"code":393,"filename":178,"language":185,"meta":186,"style":186},"export default defineNuxtConfig({\n  hub: {\n    kv: {\n      driver: 'cloudflare-kv-binding',\n      namespaceId: '\u003Ckv-namespace-id>'\n    }\n  }\n})\n",[168,395,396,408,416,424,443,458,464,469],{"__ignoreMap":186},[190,397,398,400,402,404,406],{"class":192,"line":193},[190,399,197],{"class":196},[190,401,200],{"class":196},[190,403,204],{"class":203},[190,405,208],{"class":207},[190,407,212],{"class":211},[190,409,410,412,414],{"class":192,"line":215},[190,411,219],{"class":218},[190,413,222],{"class":211},[190,415,225],{"class":211},[190,417,418,420,422],{"class":192,"line":228},[190,419,231],{"class":218},[190,421,222],{"class":211},[190,423,225],{"class":211},[190,425,426,429,431,434,437,440],{"class":192,"line":240},[190,427,428],{"class":218},"      driver",[190,430,222],{"class":211},[190,432,433],{"class":211}," '",[190,435,436],{"class":310},"cloudflare-kv-binding",[190,438,439],{"class":211},"'",[190,441,442],{"class":211},",\n",[190,444,445,448,450,452,455],{"class":192,"line":246},[190,446,447],{"class":218},"      namespaceId",[190,449,222],{"class":211},[190,451,433],{"class":211},[190,453,454],{"class":310},"\u003Ckv-namespace-id>",[190,456,457],{"class":211},"'\n",[190,459,461],{"class":192,"line":460},6,[190,462,463],{"class":211},"    }\n",[190,465,467],{"class":192,"line":466},7,[190,468,243],{"class":211},[190,470,472,474],{"class":192,"line":471},8,[190,473,249],{"class":211},[190,475,252],{"class":207},[477,478,480],"callout",{"to":479},"https://developers.cloudflare.com/kv/concepts/kv-bindings/","Learn more about KV bindings on Cloudflare's documentation.",[266,482,485,486,159],{"icon":483,"label":484},"i-simple-icons-deno","Deno KV","When deploying to Deno Deploy, it automatically configures ",[147,487,484],{"href":488,"rel":489},"https://deno.com/kv",[151],[266,491,494,505,512,518],{"icon":492,"label":493},"i-simple-icons-nodedotjs","Other",[143,495,496,497,499,500,159],{},"When deploying to other providers, Nitro Storage ",[168,498,170],{}," is configured to use the ",[147,501,504],{"href":502,"rel":503},"https://unstorage.unjs.io/drivers/fs#nodejs-filesystem-lite",[151],"filesystem",[323,506,508,509,511],{"to":507},"#manual-configuration","You can manually configure the ",[168,510,170],{}," mount to use a different storage driver.",[143,513,514,515,517],{},"Or directly set the ",[168,516,353],{}," environment variable.",[181,519,520],{"className":295,"code":357,"filename":297,"language":298,"meta":186,"style":186},[168,521,522],{"__ignoreMap":186},[190,523,524,526,528],{"class":192,"line":193},[190,525,353],{"class":207},[190,527,307],{"class":211},[190,529,368],{"class":310},[531,532,533,534,537,538,159],"important",{},"If no automatic configuration is found, it will default to ",[147,535,504],{"href":502,"rel":536},[151]," and store the data in the ",[168,539,540],{},".data/kv",[254,542,544],{"id":543},"manual-configuration","Manual Configuration",[143,546,547,548,552,553,556],{},"You can use any ",[147,549,158],{"href":550,"rel":551},"https://unstorage.unjs.io/drivers",[151]," driver by configuring the ",[168,554,555],{},"hub.kv"," option with a driver and its options.",[477,558,559,560,564],{"to":550},"You can find the driver list on ",[147,561,563],{"href":550,"rel":562},[151],"unstorage documentation"," with their configuration.",[181,566,568],{"className":183,"code":567,"filename":178,"language":185,"meta":186,"style":186},"export default defineNuxtConfig({\n  hub: {\n    kv: {\n      driver: 'redis',\n      url: 'redis://localhost:6379',\n      /* any additional driver options */\n    }\n  }\n})\n",[168,569,570,582,590,598,613,629,635,639,643],{"__ignoreMap":186},[190,571,572,574,576,578,580],{"class":192,"line":193},[190,573,197],{"class":196},[190,575,200],{"class":196},[190,577,204],{"class":203},[190,579,208],{"class":207},[190,581,212],{"class":211},[190,583,584,586,588],{"class":192,"line":215},[190,585,219],{"class":218},[190,587,222],{"class":211},[190,589,225],{"class":211},[190,591,592,594,596],{"class":192,"line":228},[190,593,231],{"class":218},[190,595,222],{"class":211},[190,597,225],{"class":211},[190,599,600,602,604,606,609,611],{"class":192,"line":240},[190,601,428],{"class":218},[190,603,222],{"class":211},[190,605,433],{"class":211},[190,607,608],{"class":310},"redis",[190,610,439],{"class":211},[190,612,442],{"class":211},[190,614,615,618,620,622,625,627],{"class":192,"line":246},[190,616,617],{"class":218},"      url",[190,619,222],{"class":211},[190,621,433],{"class":211},[190,623,624],{"class":310},"redis://localhost:6379",[190,626,439],{"class":211},[190,628,442],{"class":211},[190,630,631],{"class":192,"line":460},[190,632,634],{"class":633},"sHwdD","      /* any additional driver options */\n",[190,636,637],{"class":192,"line":466},[190,638,463],{"class":211},[190,640,641],{"class":192,"line":471},[190,642,243],{"class":211},[190,644,646,648],{"class":192,"line":645},9,[190,647,249],{"class":211},[190,649,252],{"class":207},[477,651,559,652,564],{"to":550},[147,653,563],{"href":550,"rel":654},[151],[656,657,658],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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);}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":186,"searchDepth":215,"depth":215,"links":660},[661],{"id":163,"depth":215,"text":11,"children":662},[663,664],{"id":256,"depth":228,"text":257},{"id":543,"depth":228,"text":544},"Set up Key-Value Storage in your Nuxt application, including installation, environment configuration, and connecting to your KV database.","md",null,{},true,{"title":40,"description":665},"m8Jk1PhpzP1RE-ktnRAm-9Knm4oaHDTMBqYyjWxHAI0",[673,675],{"title":69,"path":70,"stem":71,"description":674,"children":-1},"Learn how to use the @nuxthub/blob SDK to list, read, store, and delete files in your Blob Storage.",{"title":80,"path":81,"stem":82,"description":676,"children":-1},"Learn how to use the KV SDK to store, retrieve, update, and delete key-value pairs in your Nuxt application, with practical examples and best practices.",1774893097709]