Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion keep alive webserver
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Caswell  
View profile  
 More options Mar 12 2012, 12:08 pm
From: Tim Caswell <t...@creationix.com>
Date: Mon, 12 Mar 2012 11:08:54 -0500
Local: Mon, Mar 12 2012 12:08 pm
Subject: Re: [nodejs] keep alive webserver

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:/us r/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 <

delbiancoflavi...@gmail.com> 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 nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.