How To Set Up Runcloud Node.JS
Setting up nodejs with runcloud.io can be confusing, but in reality it is very easy.
First, connect to your server with ssh:
ssh runcloud@yourserver.runcloud
Then cd to your home directory, become root and install nodejs + npm:
yourserver.runcloud $ cd ~
yourserver.runcloud $ su
# Insert root password
Go to: https://github.com/nodesource/distributions/blob/master/README.md
Choose your distribution and follow the instruction to install nodejs, you need to. I will put the instructions for my specific case:
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Then type node and npm to see if they are installed.
Now exit from super user and change npm configuration to use your $HOME directory:
# exit # Exit from super user
yourserver.runcloud $ NPM_PACKAGES="$HOME/.npm-packages"
yourserver.runcloud $ mkdir -p "$NPM_PACKAGES"
Set npm to use this directory for its global package installs:
yourserver.runcloud $ echo "prefix = $NPM_PACKAGES" >> ~/.npmrc
Configure your PATH to see commands in your $NPM_PACKAGES prefix by adding the following to your .bashrc
# NPM packages in homedir
export NPM_PACKAGES="$HOME/.npm-packages"
# Tell our environment about user-installed node tools…