KV
Save small values like settings under a key. Read them from any route.
nuxt.config.ts
export default defineNuxtConfig({
modules: ['vite-hub/nuxt'],
vitehub: {
host: 'node',
// Node supports shared stores and local files
kv: true,
},
})Deploy on
Node / Docker: Redis / Postgres / fs-lite
Same code on every host
Values stay on disk in development. On Cloudflare, Deno, Redis, Postgres, or Upstash, your routes do not change.
Counters and one-time values
setIfAbsent() writes a token once. increment() counts and getAndDelete() reads a value only once, on local files, Redis, a Database, or Upstash.