https://github.com/abdizriel/nodejs-microservice-starter
:seedling: NodeJS RESTful API Microservice Starter
https://github.com/abdizriel/nodejs-microservice-starter
api-microservice docker-container javascript microservice microservices mongodb nodejs nodejs-microservices
Last synced: about 1 month ago
JSON representation
:seedling: NodeJS RESTful API Microservice Starter
- Host: GitHub
- URL: https://github.com/abdizriel/nodejs-microservice-starter
- Owner: Abdizriel
- License: isc
- Created: 2016-07-03T10:37:37.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-01T10:58:37.000Z (over 7 years ago)
- Last Synced: 2025-04-09T15:08:18.951Z (about 1 month ago)
- Topics: api-microservice, docker-container, javascript, microservice, microservices, mongodb, nodejs, nodejs-microservices
- Language: JavaScript
- Homepage:
- Size: 173 KB
- Stars: 303
- Watchers: 12
- Forks: 74
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

# NodeJS RESTful API Microservice Starter v1.2.0
This repository contains a full configuration that runs NodeJS RESTful API Microservice Starter.[](https://travis-ci.org/Abdizriel/nodejs-microservice-starter)
[](https://coveralls.io/github/Abdizriel/nodejs-microservice-starter?branch=master)
[](https://david-dm.org/Abdizriel/nodejs-microservice-starter)
[](https://david-dm.org/Abdizriel/nodejs-microservice-starter#info=devDependencies)## Requirements
* [MongoDB](https://www.mongodb.com/download-center "MongoDB")
* [NodeJS](https://nodejs.org/en/download "NodeJS")## Build for local development
You have to use the following command to start a development server:
```sh
npm run dev
```See `package.json` for more details.
## Build for staging and production environments
Use following command to build project:
```sh
npm run build
```Use following command to start project on staging and production environments:
```sh
npm start
```See `package.json` for more details.
## Tests
Following tests libraries are used for unit/integration tests:
* [MochaJS](https://mochajs.org "MochaJS")
* [SinonJS](http://sinonjs.org "SinonJS")
* [ChaiJS](http://chaijs.com/ "ChaiJS")Tests are kept next to source with following pattern *.spec.js
Use following command to run tests:
```sh
npm test
```Use following command to run tests coverage:
```sh
npm run coverage
```## Docker container
There is available Docker container and Docker Composer if you would like to run many NodeJS Microservices.
Build API Microservice by using following command:
```sh
npm run build
```Then use following command to build Docker containers:
```sh
docker-compose up -d --build
```See `Dockerfile` and `docker-compose.yml` for more details.