January 2016
Intermediate to advanced
278 pages
4h 53m
English
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

Figure 9.7 After running node.js process
Read now
Unlock full access