Hello world api project in nodejs
-
Become a root user in EC2 server. sudo su - root
-
Install GIT Client in EC2 server sudo yum install git -y
-
Download code from GIT repository to EC2 Server git clone https://github.com/codeonedigest/nodejs-helloworld-api-project.git
-
Install NVM (node version manager) in EC2 server curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash . ~/.nvm/nvm.sh
-
Install Node server and NPM in EC2 Instance nvm install --lts
-
Start node server to run node application node server.js
-
Now open following url in browser to hit api. http://:8080/hellow