Skip to content

agger34/nest-microservice-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Logo

A Node.js Swagger API Microservice example

Description

This is an app that demonstrates how to use Nest.js to create a RESTful API microservice

Patterns

  • Event-sourcing
  • CQRS
  • Saga
  • ...

Installation

$ npm
$ docker-compose

Running the app

# development

## docker-compose => redis, mongodb, rabbit containers
$ docker-compose up -d

## apps
$ npm install --global cross-env
$ cd /services/service_name
$ npm install
$ npm run start

Relateds Links

Swagger Explorer URL: http://localhost:3000/api

Simple functions

Orders Application

  • Create/Cancel/Read an order
  • Auto deliver orders after X secords

Payments Application

  • pub/sub events by Order App

TBC

  • write Event store and restore Read storage
  • Handling concurrent updates using optimistic locking
  • Using snapshots to improve performance
  • ...

About

This is an app that demonstrates how to use Nest.js to create a RESTful API microservice

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published