sudo su -
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install node
node -v
npm -v
npm install npm -g
npm install pm2 -g
sudo apt-get update -y OR sudo yum update -y
apt-get install git -y OR yum install git -y
git --version
We now need to go back to being a user, type:
exit
Your cursor will be ubutu@ip-*******
git clone https:/darrensw777/node-js-jwt-auth-mongodb.git
cd node-js-jwt-auth-mongodb
npm install
pm2 start server.js
Type | Protocol | Port range | Source |
---|---|---|---|
SSH | TCP | 22 | Anywhere-IPv4 |
Custom TCP | TCP | 8000-9000 | Anywhere-IPv4 |
HTTP | TCP | 22 | Anywhere-IPv4 |
HTTPS | TCP | 22 | Anywhere-IPv4 |
Type | Protocol | Port range | Source |
---|---|---|---|
All traffic | All | All | Anywhere-IPv4 |
Look at your instance list and click the Instance ID link which will take you to an overview.
On that page, look for: Public IPv4 address, combine that with the port the app runs on to derive your url.
e.g.
NB HTTP, NOT HTTPS