Skip to content

Latest commit

 

History

History
61 lines (39 loc) · 1.41 KB

File metadata and controls

61 lines (39 loc) · 1.41 KB

Nest Logo

Description

Nest framework TypeScript example for event-sourcing. This is a monorepo.

There are 2 main parts of the application:

  • customer: where a person is registered with minimum details and a initial balance amount
  • order: where a customerId is used to order items for an amount. If the amount is less than balance then it is ACCEPTED otherwise REJECTED

No authentication, just plain and simple APIs.

Installation

$ npm install

Running the app

Prereqs

  • Kafka. Configurable through KAFKA_BROKERS env variable.
  • MongoDB. Configurable through CUSTOMERS_VIEW_SVC_MONGO_URI and ORDERS_VIEW_SVC_MONGO_URI env variables.
# development
$ npm run start <service>

# watch mode
$ npm run start:dev <service>

# production mode
$ npm run start:prod <service>

The services are under app/, each folder is a separate service.

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

License

Nest is MIT licensed.