Example Node.js RESTful API microservice for an Blog with unit tests, code style checking and good test coverage. The microservice exposes REST APIs which are documented using Swagger.
You have to use the following command to start a development server:
npm install
npm run devSee package.json for more details.
npm install --production
npm startSee package.json for more details.
Following tests libraries are used for unit/integration tests:
Tests are kept next to source with following pattern *.spec.js
Use following command to run tests in each micorservice directories:
npm testUse following command to run tests coverage in each micorservice directories:
npm run coverageUse following command to Generate and Open Documenation in Browser in each micorservice directories:
make sure microservice is running to test docs, interactively
npm run docsUse following command to setup microserives and deploy:
docker-compose up -d --buildSee Dockerfile in Microservice directories and docker-compose.yml for more details.
