I also use upstart. I *hate* upstart, but keeping your process up is something 
you want the kernel to be responsible for.

On Mar 12, 2012, at March 12, 20129:08 AM, Tim Caswell wrote:

> it depends on your system.  On Ubuntu I use upstart and create a small script 
> in /etc/init/SOMENAME.conf.  And then you can use start, stop, and restart 
> like  `sudo start SOMENAME`
> 
> Here is the upstart config for howtonode.org:
> 
>     description       "Run node server"
> 
>     env 
> PATH=/home/tim/nvm/v0.6.11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
> 
>     respawn
>     start on runlevel [23]
> 
>     script
>       cd /home/tim
>       exec node server.js > access.log 2>> error.log 
>     end script
> 
> Because of the "start on runlevel [23]" line it's started whenever the server 
> reboots.  The "respawn" line restarts the node process if it dies.
> 
> On Mon, Mar 12, 2012 at 10:02 AM, Flavio Del Bianco 
> <[email protected]> wrote:
> Hi, I'm learning nodejs and I had a doubt in how I keep alive a
> webserver without running it everytime like $ node myserver.js? and
> how it can connect alone every time the server get on like it does
> apache.
> 
> --
> 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
> 
> 
> -- 
> 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

-- 
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

Reply via email to