Classify articles under Linux tips

Node.js is usually executed as a user command. When the user disconnects the client, the operation stops, which is very annoying. So how to make the Node.js application as a service and execute it in the background?

The simplest way is to use the nohup command:

  • nohup node app.js

However, forever can do more things, such as recording output and error logs separately, for example, it can be used as an API in js, building websites, and so on.

First, we will install forever

-Read the rest-