Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.04 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.04 KB

Rest-Api using Express, Jest, Prometheus and Swagger Docs

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

rest-api

Routes

User Resource

  • Create User
  • Create Session
  • Get Sessions
  • Delete Session

Product Resource

  • Create Product
  • Get Product
  • Update Product
  • Delete Product

Metrics

  • Get metrics

Usage

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 :)