What's the right way to start a node.js service?
Posted
by
elliot42
on Server Fault
See other posts from Server Fault
or by elliot42
Published on 2012-09-16T23:31:22Z
Indexed on
2012/09/17
3:39 UTC
Read the original article
Hit count: 654
I'm running a node.js service (statsd
) on CentOS 6. What's the proper way to daemonize and start such a service?
Potential Daemonizers--are daemonizers supposed to be language-specific or general?:
- forever (node-specific)
- daemonize
- nohup (presumably wrong)
- start-stop-daemon(debian-only? is this for daemonizing or starting/stopping? what is the Centos equivalent?)
- Should the app itself really know how to daemonize itself and then have a
-d
flag? (e.g. via node-daemonize2 or forever-monitor?)
Service starters--should these be from the system/distro, or should they be from monitoring tools such as monit?:
service
? is really/etc/init.d
on CentOS?service
? is really Upstart on Ubuntu?- monit?
- daemontools?
- runit?
I'm unfortunately new to this--where can I read up on what is the most standard, classic, reliable way of doing this?
© Server Fault or respective owner