A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
Nest framework TypeScript starter repository.
Simple Nestjs application implementing CQRS principles with SAGA around a product.
The saga adds the product to the catalog (it's just an example ;) )
$ npm install
# start docker compose
$ docker-compose up
# end docker compose
$ docker-compose down
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
POST http://localhost:3000/product
Body raw (JSON):
{
"name": "chemise",
"sku": "f5865847-6951-467d-a1bd-bef0b970ab35",
"price": "29",
"currency": "euro"
}
PUT http://localhost:3000/product/{id}
Example : http://localhost:3000/product/f5865847-6951-467d-a1bd-bef0b970ab35
Body raw (JSON):
{
"name": "pantalon",
"sku": "f5865847-6951-467d-a1bd-bef0b970ab35",
"price": "43",
"currency": "euro"
}
DELETE http://localhost:3000/product/{id}
Example : http://localhost:3000/product/f5865847-6951-467d-a1bd-bef0b970ab35
GET http://localhost:3000/product
GET http://localhost:3000/product/{id}
Example : http://localhost:3000/product/f5865847-6951-467d-a1bd-bef0b970ab35
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov