Vercel

Deploy your application to Vercel. You’ll need a hosted database backend (we recommend PocketHost) and configured Vercel environment variables.

New projects build with @sveltejs/adapter-node, which is what vela deploy runs. Switch to Vercel’s adapter first:

$ npm uninstall @sveltejs/adapter-node
$ npm install -D @sveltejs/adapter-vercel

Then import the adapter from @sveltejs/adapter-vercel in vite.config.ts:

import adapter from '@sveltejs/adapter-vercel';

Set the environment variables and deploy:

$ vercel env add POCKETBASE_URL
$ vercel env add POCKETBASE_SUPERUSER_EMAIL
$ vercel env add POCKETBASE_SUPERUSER_PASSWORD
$ vercel deploy