In Python Twisted, you have the twistd
command that helps you with a number of things related to running your application (daemonize it for example).
Ho
UPDATE: i updated to include the latest from pm2:
for many use cases, using a systemd service is the simplest and most appropriate way to manage a node process. for those that are running numerous node processes or independently-running node microservices in a single environment, pm2 is a more full featured tool.
https://github.com/unitech/pm2
http://pm2.io
pm2 monit
or process list with pm2 list
pm2 logs
- Behavior configuration
- Source map support
- PaaS Compatible
- Watch & Reload
- Module System
- Max memory reload
- Cluster Mode
- Hot reload
- Development workflow
- Startup Scripts
- Auto completion
- Deployment workflow
- Keymetrics monitoring
- API
The simplest approach would just to send the command to the background.
$ node server.js &
Then you can kill the process at a later time. I usually do the following:
$ killall node
Note: I'm running OS X.