albertleng / first-node-application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

First Node Application

Description

This is my first node application. It is a simple application that demonstrates basic commands of Node and NPM.

Installation

First initialize npm in your project. This will create a package.json file for managing dependencies.

npm init

Then, install the project dependencies:

npm install

Steps to create a Docker image and deploy to AWS ECR

  1. Build the Docker image
docker build -t node-docker-albert-20240417 .
  1. Create a repository in AWS ECR
aws ecr create-repository --repository-name node-docker-albert-20240417
  1. Authenticate Docker to your ECR repository
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 255945442255.dkr.ecr.us-east-1.amazonaws.com
  1. Tag the Docker image
docker tag node-docker-albert-20240417:latest 255945442255.dkr.ecr.us-east-1.amazonaws.com/node-docker-albert-20240417:latest
  1. Push the Docker image to AWS ECR repo
docker push 255945442255.dkr.ecr.us-east-1.amazonaws.com/node-docker-albert-20240417:latest

Screenshots



Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About


Languages

Language:JavaScript 84.4%Language:Dockerfile 15.6%