Skip to content
Discussion options

You must be logged in to vote

You can deploy a full-stack Next.js + NestJS app by hosting them separately and connecting via API.

Frontend (Next.js):

  • Deploy on Vercel (best for Next.js apps)
  • Set environment variables pointing to your backend (e.g., NEXT_PUBLIC_API_URL=https://api.example.com)

Backend (NestJS):

  • Deploy on services like Render, Railway, Heroku, or your own VPS
  • Enable CORS to allow requests from your frontend domain

Optional:

  • Use a reverse proxy like Nginx or use Docker Compose if self-hosting
  • For monorepos, check out Turborepo + Vercel + separate API deployment

Let me know if you need help with a specific platform!

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies

This comment was marked as off-topic.

Comment options

You must be logged in to vote
1 reply
@Umohmarvelous
Comment options

Answer selected by Umohmarvelous
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development
5 participants