[Cherokee] node.js?

47 views
Skip to first unread message

- -

unread,
Jan 24, 2013, 5:38:09 AM1/24/13
to cher...@lists.octality.com
Hi there,

I have a software that requires nodejs and I start it by "node api/server.js".

Can I somehow start that server.js with cherokee, instead of nodejs. Or have nodejs run by cherokee, or similar?

The reason is that I want to have it running on boot and if theres a nice possibility with what I already have, that'd be great.

Thanks

Stadtpirat

Locke Bircher

unread,
Jan 24, 2013, 11:35:05 AM1/24/13
to - -, cher...@lists.octality.com
It might be better to not have Cherokee tied to your node app. Instead, start it up on boot by itself and keep it running separately.

Google around and I'm sure you can find ways to have your node app run on boot.

A quick search revealed the possibility of adding it to /etc/rc.local or this http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/

To keep your node app running, use something like "forever" https://github.com/nodejitsu/forever

-Locke

_______________________________________________
Cherokee mailing list
Cher...@lists.octality.com
http://lists.octality.com/listinfo/cherokee


David Beitey

unread,
Jan 30, 2013, 12:22:36 AM1/30/13
to - -, cher...@lists.octality.com
It is possible to have Cherokee start your service for you (add the command to run it as a Local Interpreter under Information Sources in your Cherokee-admin control panel), but a word of warning is that if you need to restart your Cherokee instance, it will restart your service as well.  Also, there isn't presently the ability to control or restart the local interpreter from Cherokee.  

This might fit your use-case, but I found it far more robust to use something like Supervisor (http://supervisord.org/) which gives a lot more control over your processes.  Using something like this (or init.d or rc.d etc) means the service(s) can start on boot, rather than 'on first access' which is what happens if started as part of Cherokee.

-- David

Reply all
Reply to author
Forward
0 new messages