/nestjs-simplified-cqrs-model

Illustration of our blog article "Simplified CQRS Model with NestJS"

Primary LanguageTypeScriptMIT LicenseMIT

A simplified CQRS model with NestJS for building GraphQL and Rest APIs

SwitchIt - Conseil Logo

We build your next generation software !

Built with

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

Description

This repository is for illustrating our blog article that can be found here: A simplified CQRS model with NestJS (I am sorry the article is in french)

Installation

$ yarn install
$ docker stack deploy switchit --compose-file=./docker-compose.yml

Running the app

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Testing the API

Graphql

Once started you can browse to http://localhost:3000/graphql to open the GraphQL PlayGround given with the application.

Rest API

You can register a user using:

$ curl -d '{"email":"contact@switchit-conseil.com", "password":"changeme"}' -H "Content-Type: application/json" -X POST http://localhost:3000/users

Support

This is an MIT-licensed open source project. It is for demonstration only for the purpose of our blog article.

Stay in touch

License

This project is MIT licensed.