Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 5 hours 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 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-19T06:29:00.000Z (5 months ago)
- Last Synced: 2024-06-19T14:11:29.777Z (5 months ago)
- Topics: fastify, jest, mongodb, nodejs, swagger, typescript
- Language: TypeScript
- Homepage:
- Size: 911 KB
- Stars: 97
- Watchers: 4
- Forks: 18
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-fastify-mongo-api
Node.js Restful API starter template with TypeScript, Fastify, MongoDB, Jest and Swagger.[![Build status](https://github.com/gmarokov/node-fastify-mongo-api/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/gmarokov/node-fastify-mongo-api/actions/workflows/node.js.yml)
[![Coverage Status](https://coveralls.io/repos/github/gmarokov/node-fastify-mongo-api/badge.svg?branch=main)](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.