Some recommendations for running in production environments.
> npm install -g cs
> git clone {{yourapp}} /your/app/dir
> cd /your/app/dir
> npm install
If you aren't using GIT, just copy your files to your server manually then
npm install
Add your Nginx Rule (Assumes your production port is 3000)
server {
listen 80;
server_name {{yourDomain.com}}
location / {
proxy_pass http://127.0.0.1:3000/;
}
}
Install forever
npm install -g forever
Restart Nginx
> /etc/init.d/nginx restart
forever start -c "node --harmony" index.js production
forever restart index.js