https://github.com/marck010/snack-machine
A service to a snack machine.
https://github.com/marck010/snack-machine
docker expressjs-framework ioc javascript mocha-tests mongodb mongolab mongoose nodejs
Last synced: 5 months ago
JSON representation
A service to a snack machine.
- Host: GitHub
- URL: https://github.com/marck010/snack-machine
- Owner: marck010
- Created: 2018-06-09T23:30:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T07:02:40.000Z (over 7 years ago)
- Last Synced: 2025-03-21T06:11:41.876Z (12 months ago)
- Topics: docker, expressjs-framework, ioc, javascript, mocha-tests, mongodb, mongolab, mongoose, nodejs
- Language: JavaScript
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## snack-machine
Service to control a snack machine.
- Dependencies
* Docker
* Docker-Compose
* npm
- To install dependencies in linux `Ubuntu` execute script.
> ./instal-dependencies.sh
- Service
* To run the service run the command below.
> sudo docker-compose up -build -d #The service will be start in port 8000
* Routes
POST: /buyProduct/
body: {
"product_id": string,
"card_number": string
}
POST: /insertCard/
body: {
"card_number": string
}
* Test
- To execute unit test run command in root directory of repository
> npm test
- Database
* Pre-registrated data
product_id = "5b220e6b2b53778e5a868587",
card_number = "001"