Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

learning_Microservice

node --version npm --version

You are now ready to create a stub Node.js project npm init -y

Installing expressjs npm install --save express

Note that --save isn’t actually necessary anymore. In older versions of Node.js, this was required; these days, it’s the default. I’ve included --save explicitly so that I can highlight what it does, but you don’t actually have to use this anymore.

Installing npm

npm install

Error Handling

throw new error("Please specify the port number for the HTTP server with the environment variable PORT.");

Specifying the port number as an environment variable

Production Environment

Setting up for production

You to get an existing Node.js project ready to run, you must first install dependencies like this:

npm install --only=production npm start

pipeline

To create our live reload pipeline, we’ll install a package called nodemon

npm install --save-dev nodemon

Now that we are going to be using nodemon instead, we’ll replace node with nodemon and run it like this:

npx nodemon index.js

previous section you learned about the convention of using npm start

npm run start:dev

comment are not permitted in json

/"test": "echo "Error: no test specified" && exit 1

docker run --rm -ti video-streaming sh

docker exec -it 360745012bf /bin/sh

docker kill <your-container-id>
docker rm <your-container-id>
docker rmi <your-image-id> --force

Docker comopse is useful for development environment

Developing microservices with Docker Compose

Create a subdirectory for our microservices

docker compose -d --build --build context allow for the changes that has been made to be capture if new code has been added to the microservices.

docker-compose ps

Docker compose command is another layer over docker

docker image list

docker container list

docker logs <id>

aws ecr create-repository --repository-name <repo_name> --region <region_name>

deploy_image_on_ecr

CHapter 4

`Docker compose up --build` build the image before starting the container

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages