-
Notifications
You must be signed in to change notification settings - Fork 0
Running in production
Luke Duncalfe edited this page May 8, 2018
·
6 revisions
adduser nanostream
You can daemonize the executables however you like on your server. One very handy and node-friendly method is to use pm2
that also lets you monitor, and restarts them if they crash.
npm install pm2@latest -g
Log in as the non-root user:
sudo su - nanostream
Then tell pm2 to manage the two executables:
pm2 start nano-stream-x
pm2 start nano-stream-ws
Any arguments can be passed like this:
pm2 start nano-stream-ws -- port=8081
Check that the executables are running correctly by tailing their logs:
pm2 logs