https://github.com/gmarokov/node-fastify-mongo-api
Node.js Restful API starter template
https://github.com/gmarokov/node-fastify-mongo-api
fastify jest mongodb nodejs swagger typescript
Last synced: 9 months ago
JSON representation
Node.js Restful API starter template
- Host: GitHub
- URL: https://github.com/gmarokov/node-fastify-mongo-api
- Owner: gmarokov
- License: mit
- Created: 2020-02-12T12:39:57.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T13:18:39.000Z (11 months ago)
- Last Synced: 2025-03-29T15:11:21.156Z (9 months ago)
- Topics: fastify, jest, mongodb, nodejs, swagger, typescript
- Language: TypeScript
- Homepage:
- Size: 1.04 MB
- Stars: 105
- Watchers: 3
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-boilerplate - GitHub
README
# node-fastify-mongo-api
Node.js Restful API starter template with TypeScript, Fastify, MongoDB, Jest and Swagger.
[](https://github.com/gmarokov/node-fastify-mongo-api/actions/workflows/node.js.yml)
[](https://coveralls.io/github/gmarokov/node-fastify-mongo-api?branch=main)
## Requirements
1. Node.js >= 10
2. Docker
## Getting started
1. Install packages:
`npm install`
3. Run project:
`npm run start:dev`
## Testing
Using Jest for endpoint integration testing and swapping MongoDB with In Memory Mongo server.
Code coverage report generated and consumed by [Coveralls](https://coveralls.io/).
1. Run tests with coverage:
`npm run test`
## Additional information
- Pre-commit hook is configured to run ESLint and Prettier before each commit with Husky.
- Debug configuration for VS Code is included.
## Documentation
Using Swagger for the endpoints documentation. Swagger UI available at [http://localhost:3000/docs](http://localhost:3000/docs).
Additional Postman collection attached to repository.