Boilerplate for Node.js Express RESTful API application with MySQL, Swagger, Jest, and Coveralls
This boilerplate include the following features:
- Swagger API documentation based on JSDoc
- Unit Test and Integration Test along with Test Coverage using Jest testing framework
$ git clone <repo-url> <project-name>
$ cd <project-name>
$ cp .env.sample .env
$ npm install# Run the application for development
$ npm run start:dev
# Run the application in production
$ npm run start# Test
$ npm run test # Run all test
$ npm run test:unit # Run only unit test
$ npm run test:integration # Run only integration test
# Test (Watch Mode for development)
$ npm run test:watch # Run all test with watch mode
$ npm run test:watch:unit # Run only unit test with watch mode
$ npm run test:watch:integration # Run only integration test with watch mode
# Test Coverage
$ npm run test:coverage # Calculate the coverage of all test
$ npm run test:coverage:unit # Calculate the coverage of unit test
$ npm run test:coverage:integration # Calculate the coverage of integration test
# Test consistent coding style (Lint)
$ npm run lint # Lint all sourcecode
$ npm run lint:app # Lint app sourcecode
$ npm run lint:test # Lint test sourcecode