A barebones Node.js app using Express 4.
This application supports the Getting Started on Heroku with Node.js article - check it out.
Make sure you have Node.js and the Heroku CLI installed.
$ git clone https://github.com/heroku/node-js-getting-started.git # or clone your own fork
$ cd node-js-getting-started
$ npm install
$ npm startYour app should now be running on localhost:5000.
$ heroku create
$ git push heroku main
$ heroku open
or
For more information about using Node.js on Heroku, see these Dev Center articles:
- Getting Started on Heroku with Node.js
- Heroku Node.js Support
- Node.js on Heroku
- Best Practices for Node.js Development
- Using WebSockets on Heroku with Node.js
-
Use Cloud Native BuildPacks (https://buildpacks.io/) to create Docker image for Heroku app:
pack build node-js-getting-started --builder heroku/buildpacks:20 ``` -
Create ECR repo with Service Catalog:
cd infrastructure-live/stage/ecr-repos terragrunt apply ```
-
Push Docker image to ECR repo:
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 087285199408.dkr.ecr.eu-west-1.amazonaws.com/node_js_getting_started docker tag node-js-getting-started 087285199408.dkr.ecr.eu-west-1.amazonaws.com/node_js_getting_started:v1 docker push 087285199408.dkr.ecr.eu-west-1.amazonaws.com/node_js_getting_started:v1 -
Deploy VPC:
cd infrastructure-live/stage/vpc terragrunt apply -
Deploy ALB:
cd infrastructure-live/stage/alb terragrunt apply -
Deploy Fargate ECS Cluster:
cd infrastructure-live/stage/ecs-cluster terragrunt apply -
Deploy Docker image:
cd infrastructure-live/stage/node-js-getting-started terragrunt apply
