Skip to content

muhammadasif84/nodejs-ec2-deployment

Repository files navigation

nodejs-ec2-deployment

Node.Js deployment on ec2 using terraform, pm2.


1- Create instance infra using terraform
2- Add user_data for configuration setup => node.js, npm and pm2

Please follow these following steps to deploy Node.Js server on Aws EC2


i- Edit example-terraform.tfvars to terraform.tfvars and add all values.

ii- Commands

terraform init
terraform fmt
terraform validate
terraform plan
terraform apply --auto-approve
iii- run public_ip address of ec2 in browser, it should show "Node.js server is running on Ubuntu EC2"

Destroy all Resources created for this deployment

terraform destroy --auto-approve

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published