1

I have moved my express site on to a free tier Amazon EC2 Server.

I want to have the server live however the only way I know how to run the site is via SSH (via Putty), although the problem with this is that as soon as Putty closes the site is down.

Is there a way around this?

Nick White
  • 1,602
  • 4
  • 20
  • 35
  • I may be wrong, because I'm fairly new to node.js and express, but I think most people use nginx or some web server to host node.js in. Are you doing this? [SO Post about setup](http://stackoverflow.com/questions/5009324/node-js-nginx-and-now) – Davin Tryon Mar 15 '12 at 23:36
  • 1
    Node.js is capable of serving HTTP content on its own, so running nginx or apache and proxying to node.js isn't necessary (although depending on your architecture is advisable). – djlumley Mar 15 '12 at 23:41

1 Answers1

3

The problem you're (probably) having is that you're not running it as a background process. The correct solution is to convert the process to a daemon, or something similar.

See: Node.js as a background service and https://github.com/nodejitsu/forever

Community
  • 1
  • 1
djlumley
  • 2,955
  • 2
  • 24
  • 30