Skip to content
Avatar of vercelvercel/examples

Vercel KV for Redis SvelteKit Starter

Simple SvelteKit template that uses Vercel KV for Redis to track pageviews.

Framework
Use Case
Database
CleanShot 2023-05-01 at 11.15.32

Vercel KV for Redis SvelteKit Starter

Simple SvelteKit template that uses Vercel KV for Redis to track pageviews.

Demo

https://kv-redis-sveltekit.vercel.app/

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel

Clone and Deploy

Execute the following command to download the example into the my-project folder:

npx degit@latest https://github.com/vercel/examples/storage/kv-redis-sveltekit my-project

Once you've created the project and installed dependencies with pnpm install, copy the .env.example file in this directory to .env.local (which will be ignored by Git). Then open .env.local and set the environment variables to match the ones in your Vercel Storage Dashboard.

Alternatively, if you have setup a project already and you have installed the Vercel CLI, you can also pull the environment variables using the following command:

vercel env pull .env.local

Next, run SvelteKit in development mode:

pnpm dev

Deploy it to the cloud with Vercel (Documentation).

CleanShot 2023-05-01 at 11.15.32
Avatar of vercelvercel/examples

Vercel KV for Redis SvelteKit Starter

Simple SvelteKit template that uses Vercel KV for Redis to track pageviews.

Framework
Use Case
Database

Vercel KV for Redis SvelteKit Starter

Simple SvelteKit template that uses Vercel KV for Redis to track pageviews.

Demo

https://kv-redis-sveltekit.vercel.app/

How to Use

You can choose from one of the following two methods to use this repository:

One-Click Deploy

Deploy the example using Vercel

Clone and Deploy

Execute the following command to download the example into the my-project folder:

npx degit@latest https://github.com/vercel/examples/storage/kv-redis-sveltekit my-project

Once you've created the project and installed dependencies with pnpm install, copy the .env.example file in this directory to .env.local (which will be ignored by Git). Then open .env.local and set the environment variables to match the ones in your Vercel Storage Dashboard.

Alternatively, if you have setup a project already and you have installed the Vercel CLI, you can also pull the environment variables using the following command:

vercel env pull .env.local

Next, run SvelteKit in development mode:

pnpm dev

Deploy it to the cloud with Vercel (Documentation).

Unleash New Possibilities

Deploy your app on Vercel and unlock its full potential