Using SSH Terminal to Create your first NodeJS application

Using SSH Terminal to Create your first NodeJS application

Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.

Our hosting plans offer NodeJS support with Nginx Reverse Proxy Server and FREE SSL certificates to get started in Production. So want to use SSH Terminal instead of our Hosting Panel?

Steps to using terminal to create your first NodeJS app

1. Use SSH (Secure Shell) Client OR Terminal to login to your server account username: your-server-account-name password: xxxxxx

2. In terminal go to /home/your-server-account-name

3. Create a folder software for all your tools e.g. django etc.

4. Download NodeJS x64 binary distribution of your choice from: NodeJS official e.g. https://nodejs.org/download/release/v12.22.9/node-v12.22.9-linux-x64.tar.gz

5. Extract the binary in your folder software > node-v12.22.9

6. Add NodeJS to PATH by running the command: export NODEJS_HOME=/home/your-server-account-name/software/node-v12.22.9 && export PATH=$PATH:$NODEJS_HOME/bin

7. Verify installation by running the command node -v && npm -v

 nvm-sh avatar

Alternatively you can install NodeJS with a Node Version Manager such as: https://github.com/nvm-sh/nvm.

1. Use SSH (Secure Shell) Client OR Terminal to login to your server account username: your-server-account-name password: xxxxxx

2. In terminal go to /home/your-server-account-name

3. Create a folder software for all your tools e.g. django etc and change directory to that directory.

4. Use the nvm-sh / nvm script to install nvm: wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash or install via Git: https://github.com/nvm-sh/nvm#verify-installation

5. Source your .bash_profile by running the command: source ~/.bash_profile

6. Verify your nvm installation: https://github.com/nvm-sh/nvm#verify-installation

7. Download, compile, and install the latest release of node by running the command: nvm install 12.22.1

8. Verify installation by running the command node -v && npm -v

Now you have a working installation of NodeJS. You can now deploy your first NodeJS application

Tags: , ,