Skip to content

brikis98/node-js-getting-started

 
 

Repository files navigation

node-js-getting-started

A barebones Node.js app using Express 4.

This application supports the Getting Started on Heroku with Node.js article - check it out.

Running Locally

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 start

Your app should now be running on localhost:5000.

Deploying to Heroku

$ heroku create
$ git push heroku main
$ heroku open

or

Deploy to Heroku

Documentation

For more information about using Node.js on Heroku, see these Dev Center articles:

Steps to deploy

  1. Use Cloud Native BuildPacks (https://buildpacks.io/) to create Docker image for Heroku app:

    pack build node-js-getting-started --builder heroku/buildpacks:20
    ```
    
  2. Create ECR repo with Service Catalog:

    cd infrastructure-live/stage/ecr-repos
    terragrunt apply
    ```
    
  3. 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
  4. Deploy VPC:

    cd infrastructure-live/stage/vpc
    terragrunt apply
  5. Deploy ALB:

    cd infrastructure-live/stage/alb
    terragrunt apply
  6. Deploy Fargate ECS Cluster:

    cd infrastructure-live/stage/ecs-cluster
    terragrunt apply
  7. Deploy Docker image:

    cd infrastructure-live/stage/node-js-getting-started
    terragrunt apply

About

Getting Started with Node on Heroku

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • HCL 43.3%
  • EJS 40.8%
  • JavaScript 12.0%
  • CSS 3.5%
  • Shell 0.4%