REST API Build with Node.js, Express, TypeScript, MongoDB & Zod
Testing Express REST API With Jest & Supertest
Measure your ExpressJS API Performance with Prometheus
Automatically Generate Swagger Docs With ExpressJS & NodeJS
User Resource
- Create User
- Create Session
- Get Sessions
- Delete Session
Product Resource
- Create Product
- Get Product
- Update Product
- Delete Product
Metrics
- Get metrics
Env Variables
Create a .env file in the root and add the following
PRIVATE_KEY = your private jwt key
DB_CONNECTION = your mongodb uri
Install Dependencies
npm install
Run
# Run rest api(backend), swagger docs and metrics server
npm run dev
Running tests
It uses Jest & Supertest for Testing Express REST API
# Run rest-api tests only
npm run test
Happy Coding :)