Skip to content
Dashboard

Introducing storage on Vercel

Vercel KV, Vercel Postgres, Vercel Blob, and Vercel Edge Config are now available.

Copy link to headingWhy now?

Copy link to headingVercel KV: A durable Redis database

user-prefs.ts
import kv from '@vercel/kv';
export async function getPrefs() {
const prefs = await kv.get('prefs');
return prefs || {};
}
export async function updatePrefs(prefs: Record<string, string>) {
return kv.set('prefs', prefs);
}

Copy link to headingVercel Postgres: Complex data made easy

app/page.tsx
import { sql } from '@vercel/postgres';
import { redirect } from 'next/navigation';
async function create(formData: FormData) {
'use server';
const { rows } = await sql`
INSERT INTO products (name)
VALUES (${formData.get('name')})
`;
redirect(`/product/${rows[0].slug}`);
}
export default function Page() {
return (
<form action={create}>
<input type="text" name="name" />
<button type="submit">Submit</button>
</form>
);
}

Use Vercel Postgres with Next.js Server Actions (to be announced Thursday)

Copy link to headingVercel Blob: Easy file storage at the edge

app/profile/route.ts
import { put } from '@vercel/blob';
export async function PUT(request: Request) {
const form = await request.formData();
const file = form.get('file') as File;
const blob = await put('avatars/user-42.png', file, { access: 'public' });
return Response.json(blob);
}

Copy link to headingGetting started

Get started with KV

Try Vercel KV with our Next.js starter template.

Open template

Get started with Postgres

Try Vercel Postgres with our Next.js starter template.

Open template

Ready to deploy?