Deployment
Deployment
This guide explains how to build the web application and deploy it either to a traditional Node.js server or to Vercel.
Build
Run the build script from apps/web
(or with --filter web
from the repo root):
pnpm build
This executes NODE_ENV=production react-router build
and outputs files to build/
.
Deploying to Node.js
- Copy the
build/
directory andpackage.json
to your server. - Install production dependencies:
pnpm install --prod
- Start the server:
pnpm start
# or
node build/server/index.js
Ensure your environment variables are configured (see .env.example
). Common variables include BETTER_AUTH_SECRET
, RESEND_API_KEY
, and DATABASE_URL
.
Deploying to Vercel
Set the VERCEL
environment variable when building:
VERCEL=1 pnpm build
The Vercel preset generates .vercel/output
with serverless functions. Deploy this directory using the Vercel CLI or Git integration.