node-fastify-mongo-api
Node.js Restful API starter template with TypeScript, Fastify, MongoDB, Jest and Swagger.
Requirements
- Node.js >= 10
- Docker
Getting started
- Install packages:
npm install
- Run project:
npm run start:dev
- Run ESLint with Prettier for static analysis and applying consistent code formatting:
npm run lint
Testing
Using Jest for endpoint integration testing and swapping MongoDB with in memory Mongo server. Code coverage report generated and consumed by Coveralls.
- Run tests with coverage:
npm test
Documentation
Using Swagger for the endpoints documentation. Swagger UI available at http://localhost:3000/docs.
Additional Postman collection attached to repository.