Deploying to Vercel

There are two ways to deploy novel web in vercel. This assumes that you have the novel server set up in a different location.

  1. proxy mode - use rewrites in next.config.js to proxy all routes from /api /admin /auth /docs into novel server (warning, this may be costly as you scale)

  2. standalone mode - recommended. configure novel server to proxy pages and _next from the novel server location into vercel.

It is up to your preference and comfor where you want to stage your UI and server. The mode you pick now can be changed in the future based on your need.

Proxy Mode

You can run

novel web use proxy

and it will add the relevant rewrites into your next.config.js

If you want to do it manually, the rewrites applied are below

{
    "rewrites": [
    
    ]
}

Environment Variables

NEXT_PUBLIC_HOST

NEXT_PUBLIC_API_HOST

NEXT_PUBLIC_STRIPE_PUBLIC_TOKEN

NEXT_PUBLIC_GOOGLE_ANALYTICS_ID

NEXT_PUBLIC_SENTRY_DSN

SENTRY_PROJECT

SENTRY_ORG

SENTRY_AUTH_TOKEN

Last updated

Was this helpful?