Skip to content

Instantly share code, notes, and snippets.

@cedced19
Last active October 28, 2015 10:25
Show Gist options
  • Save cedced19/d14bbe1931369a048325 to your computer and use it in GitHub Desktop.
Save cedced19/d14bbe1931369a048325 to your computer and use it in GitHub Desktop.
Install Node.js

Install Node.js (by using nvm)

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
nvm install 0.12

Use Node.js on production

npm update -g pm2
pm2 start <script>.js
pm2 startup
chmod +x /etc/init.d/pm2-init.sh && update-rc.d pm2-init.sh defaults
export NODE_ENV=production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment