What is a reverse proxy and why put nginx in front of Node?

Node.js testing, performance and deployment · Freshers and experienced

Model answer

nginx receives requests from the internet and forwards them to Node on a local port. It handles HTTPS, compression, caching, static files, and connection limits efficiently, so Node focuses on application logic. Pass the Host and X-Forwarded headers and set trust proxy in Express.

Learn this topic

Deploy a MERN App to a VPS with pm2, nginx and HTTPS (Let's Encrypt) in the course MERN Stack Full Course: MongoDB, Express, React and Node.js.

Sign in to add your own answer.

More questions