How do I run Node.js and NPM on my SmartVPS?
Node.js is not intended to be used as server-wide software and should be installed on a per-user basis. This allows you to use whatever version of Node that you like and manage that on your own (which is what you want!)
To install Node.js on your server
- First install nvm, like so (FYI: Use these instructions for the latest version: https://github.com/creationix/nvm#installation)
- SSH into your server
- Run the nvm install script
This will set up nvm. (Note if you see an error like "curl invalid option: -c" email us and ask us to upgrade your version of git)curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
- Now log out of your SSH account and then log back in. Once logged back in you'll have access to nvm. Now run this command to install the latest version of node:
nvm install node
Done!
If you want to run Node as a web server contact us and let us know what port you'll be running it on and we'll open the the firewall to allow traffic through that port.
Tags: node, node.js, npm