A common scenario for using Node.js with the SDK for JavaScript is to set up and run a Node.js web application on an Amazon Elastic Compute Cloud (Amazon EC2) instance. In this tutorial, you will create a Linux instance, connect to it using SSH, and then install Node.js to run on that instance.
Step 1:- Connect to your ec2 instance
Step 2-: Install Node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Step 3:- Activate NVM
. ~/.nvm/nvm.sh
Step 4:- Install the latest version of NodeJs
nvm install node
Step 5:- Test NodeJs
node -e "console.log('Running Node.js ' + process.version)"
Lets Get Started your project with professional way