- Next.js build output and how it is optimized for production
- Supported deployment environments: Self-hosted Node.js, Vercel, Docker, and Static Export
- Common requirements for a stable and scalable deployment
Deployment Options
There are multiple ways to host your Eslot Prime frontend. Choose based on your infrastructure.-
Deploy on a Node.js Server (Self-Hosted)
This approach gives full flexibility. Follow these steps:
Upload Project to Server
Use SCP, FTP, or Git deploy to upload your project (including the.nextfolder) to your server.
Install Dependencies on ServerStart Server -
Use Process Manager (e.g., PM2)
To ensure high availability and auto-restart on failure, use PM2:if need, not mandetory, To remove an existing PM2 process:PM installation processThis setup helps keep your site running continuously as a managed Node.js process. -
Deploy to Vercel (Recommended)
Vercel is the official deployment platform for Next.js and provides:- Global CDN
- Zero config deployment
- Instant preview deployments
- Built-in optimization for Next.js features
Steps
- Connect your GitHub / GitLab / Bitbucket repo
- Select your project
- Deploy instantly with default settings
Free Hobby plans may throw intermittent errors (e.g., 504 Gateway Timeout) on long API calls. Upgrading your Vercel plan resolves this. -
Static Export (Optional)
Next.js supports exporting a static set of HTML/CSS/JS files:This produces a static version in the/outdirectory suitable for static hosts like Netlify, GitHub Pages, or S3.
Common Deployment Tips
- Point your domain’s DNS to your host
- Configure proxy or SSL for HTTPS
- Ensure CORS and API URL settings are accurate
Additional Resources
- Next.js official deployment docs — https://nextjs.org/docs/pages/building-your-application/deploying
- Vercel deployment guide — https://vercel.com/docs/concepts/deployments/overview
- PM2 process manager docs — https://pm2.keymetrics.io/