5/26/2023 0 Comments Install node js amazon linuxThanks for reading this tutorial on how to deploy nodejs app on amazon ec2 instance. PM2 will be installed on the server globally. you will install PM2 (Production manager 2) to keep live our app after closing our terminal or disconnect from the remote server. This article gives you the clear-cut picture about configuring a node js HTTPS server on an AWS EC2 instance with SSL certificate. The app is running as soon as you open the terminal and it will terminate as you will close the terminal. Your application can now be deployed live when you run: Then install Node dependencies which will create the node-modules folder by running: Git might already be installed on the instance. Install Nodejs Step 1 : Run the below commands to setup repository for Node.js on Amazon Linux 2 according to your requirement. You will clone a git repository containing a simple node app from Github, modify it and deploy. Git is a free and open-source distributed version control system. Next install git with the following command: Then install the latest version of NodeJS by running the following commands:Ĭonfirm NodeJS is install by checking the version of NodeJs installed with this command: Once you are connected to your aws ec2 instance with terminal or ssh, update the packages by running the command: Step 12: Install NodeJS and Deploy your Application Step 11: Connect Instance to Terminal Using PuttyĬonnect aws ec2 instance via ssh for Windows, mac and linux user. And wait a few minutes to completely launch your instance or web server. Click on the Launch instances button to launch your instance.
0 Comments
Leave a Reply. |