https://github.com/cn-docker/microservices-demo-nodejs
Microservices Demo - Node.js
https://github.com/cn-docker/microservices-demo-nodejs
demo-app docker-image microservice nodejs
Last synced: about 1 year ago
JSON representation
Microservices Demo - Node.js
- Host: GitHub
- URL: https://github.com/cn-docker/microservices-demo-nodejs
- Owner: cn-docker
- License: apache-2.0
- Created: 2019-01-24T23:41:29.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T03:40:09.000Z (over 1 year ago)
- Last Synced: 2024-10-30T06:25:17.308Z (over 1 year ago)
- Topics: demo-app, docker-image, microservice, nodejs
- Language: JavaScript
- Homepage: https://hub.docker.com/r/cnservices/microservices-demo-nodejs/
- Size: 77.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Microservices Demo
[](https://hub.docker.com/r/cnservices/microservices-demo-nodejs/)
[](https://hub.docker.com/r/cnservices/microservices-demo-nodejs/)
[](https://hub.docker.com/r/cnservices/microservices-demo-nodejs/)
[](https://hub.docker.com/r/cnservices/microservices-demo-nodejs/)
[](https://github.com/cn-docker/microservices-demo-nodejs)
[](https://github.com/cn-docker/microservices-demo-nodejs)
[](https://github.com/cn-docker/microservices-demo-nodejs)
[](https://github.com/cn-docker/microservices-demo-nodejs)
[](https://github.com/cn-docker/microservices-demo-nodejs)
## App1
This is a node.js app that serves a web page showing the ID of the docker container in which it is running.
To build this app, from the root of this repository just run:
docker build -t demo .
To create a container from that image, run:
docker run -p XXXX:3000 demo
You will be able to see the app going to:
localhost:XXXX
### Rest API
The app contains three Rest API.
Index - Return the served site.
localhost:XXXX
Exit Successfully - Accessing this Rest API will make the container to exit successfully.
localhost:XXXX/exitSuccess
Exit With Error - Accessing this Rest API will make the container to exit with error.
localhost:XXXX/exitWithError