Do not run as root

Running the server process as root can be dangerous. If someone discovers a vulnerability in node or in your application code, then they can cause serious damage to the system. It's always a good idea to create a user to run the application server only:

$ sudo useradd -m production

The m option will create a home path located at /home/production, where you can clone the project repo:

$ sudo su - production
$ cd ~
$ git clone https://example.com/path/to/the/project.git
Do not run as root

Figure 9.7 After running node.js process

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.132.99