Hi Friends,
Today, we are going to deploy NodeJS sample application from GITHUB so you have a basic idea,
How can we deploy NodeJS application in Ubuntu 16.04/18.04
Requirement:
Installation of NodeJS
Installation of GIT (If not installed)
GITHUB Sample application URL – https://github.com/contentful/the-example-app.nodejs
Step 1: Install the curl package
[If not already installed]
sudo apt-get update
sudo apt-get install curl -y
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
[PPA for Long Term Support (LTS) version]Step 3: Install the NodeJS package
sudo apt-get install nodejs -y
sudo -i
git clone https://github.com/contentful/the-example-app.nodejs.git
cd the-example-app.nodejs
npm install
Step 6: Now finally run the NodeJS application
[this application will run on port 3000, make sure port allow on Firewall]
npm run start:dev