On Sun, 19 Feb 2012 04:26:40 -0800 (PST), Angelo Chen wrote:
a quick solution is, run the screen first.

On Feb 19, 7:23 pm, jeeee <[email protected]> wrote:
Hello,

my node.js simple http server goes offline as soon as I logout of my ubuntu
shell.

How do I keep it alive 24/7?

@Angelo Chen:

Clearly the person in question does not understood what you said.

@jeeee:

When you ran your http server in your shell, it was attached to the
shell. This is not node.js related. You have to find a way of running
your server detached from your shell. One possible way is running
screen program. Warning: this might get confusing

Installing screen:

sudo apt-get install screen
man screen
(read it until you're more or less confortable)

Creating a screen:

screen
(or)
screen -S <some_name>

(both will get you inside a screen)

Get out of a screen (leaving it running 24/7):

Ctrl+a (and then) d (which means detach)

Listing running screens:

screen -ls

Reopening a screen (that you detached early):

screen -dr <id_from_the_previous_command>
(or)
screen -dr <some_name>
(-dr = detach anyone in the screen and reattach screen on my shell)

Close a screen:

Just stop anything you have running in the screen and exit
the shell by typing exit or Ctrl+d

There is a lot more you can do but I advise you to read some from the
man page, then play with it and then come back to the man page.

---
Diogo R.

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