simple way would be to have a master process which is monitoring the 
application processes. look at https://npmjs.org/package/up-time, it wraps 
your application. 

Am Donnerstag, 26. September 2013 11:27:59 UTC+2 schrieb vaibhav mande:
>
> Thanks greelgorke.
>
> For some reasons I need to run node process in a screen only(cant use 
> nohup, forever etc..).
> I dont think any of these modules will consider that screen session (while 
> restarting a stopped node service).
> At any point my node service should be running in a screen session only!!!
>
> My current focus is a way to notify or may be send an email stating that 
> the node service has stopped and needs a restart
> so that once I get that email I can attach to a particular screen session 
> and restart the node service manually.
>
> Thanks for the reply
> Vaibhav Mande.
>
> On Thursday, 26 September 2013 14:32:52 UTC+5:30, greelgorke wrote:
>>
>> you could use forever, mon, upstart, up. check them :)
>>
>> Am Donnerstag, 26. September 2013 10:03:54 UTC+2 schrieb vaibhav mande:
>>>
>>> Hi,
>>>
>>> I have a working node application.
>>> I am using screen to run the node application so that it stays alive.
>>> My application also uses express and node-mysql to execute few mysql 
>>> queries.
>>>
>>> I want a way so that whenever the node process stops a notification 
>>> should be sent
>>> The notification can be anything like logging in a log file a simple 
>>> text saying server stopped.
>>>
>>> I tried, 
>>> process.on('exit', function(){
>>>  //notification logic here..
>>> });
>>>
>>> but this doesn`t work.
>>>
>>> Any help will be appreciated.
>>>
>>> Thank you.
>>>
>>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to