Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 2.15 KB

README.md

File metadata and controls

61 lines (43 loc) · 2.15 KB

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version NPM Version CircleCI

Description

Nest framework TypeScript Backend API example. Test API calls on this simple backend example using NodeJS.

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

API endpoints

  • localhost:3000/products GET: get all available products
  • localhost:3000/products/{id} GET: get product by ID available products
  • localhost:3000/products POST: add a new product with JSON object in Body: {title: string, description: string, price: number}
  • localhost:3000/products/{id} DELETE: delete product by ID
  • localhost:3000/products/{id} PATCH: update product, with JSON object in Body (any): {title: string, description: string, price: number}

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov