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.
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)
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
and it will add the relevant rewrites into your next.config.js
If you want to do it manually, the rewrites applied are below
Remember to add your custom endpoints if you have any. for example, api/v1 is available by default and if you want to add private-api/v1 into it, you need to add [$$$$$$]
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?