Set Up Secure Networking for Node.js Applications

Compared to the widely used LAMP (Linux Apache MySQL PHP) or LEMP (Linux Nginx MySQL PHP) stacks, Node.js acts as both the interpreted language (PHP) and the web server (Apache/Nginx); see the following graphic. Node.js handles the communications within the application as well as with outside components.

We have full control over network setup and traffic from our Node.js code and don’t have to worry about another layer outside the codebase doing something we don’t know about, such as serving an index or allowing someone to access a file stored in one of the internal directories.

The lack of outside ...

Get Secure Your Node.js Web Application now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.