Set up Node.js application for production
When the time comes to deploy your Node.js application to production, you want to make sure you are set up for success. You want a reliable environment that gives you the freedom to make changes to your application code without bringing the site down.
The best way to do this is with a two-server setup:
- One Application server running your Node.js application
- One Web server running NGINX as a reverse proxy to serve your content to the web
There are several guides for building this environment, depending on what version of Linux you are using.
|Ubuntu||Set up Node.js application for production - Ubuntu|
|Debian||Set up Node.js application for production - Debian|
|CentOS||Set up Node.js application for production - CentOS|
|Fedora||Set up Node.js application for production - Fedora|
Once you have your application set up on your servers, you can set up your NGINX server blocks to use a domain with your application.