The Vercel KV database adapter allows you to use the Vercel KV database with Tina. This adapter uses the Upstash Redis client, allowing it to also work with Upstash Redis as well.
Looking for the code? Check out the GitHub repository.
To get started, you will need to set up some environment variables.
First copy your values from the Vercel or Upstash dashboard.
Then add the following environment variables to your project:
KV_REST_API_URL=***KV_REST_API_TOKEN=***
//...import { RedisLevel } from 'upstash-redis-level'export default isLocal? createLocalDatabase(): createDatabase({// ...databaseAdapter: new RedisLevel({namespace: branch,redis: {url: process.env.KV_REST_API_URL || 'http://localhost:8079',token: process.env.KV_REST_API_TOKEN || 'example_token',},debug: process.env.DEBUG === 'true' || false,}),})
Product
Resources
© TinaCMS 2019–2024