To run the lessons first open the main.ts
file for instructions on selecting a specific lesson to "run".
To run the code in your terminal once a lesson(s) is selected:
npm install
npm run run
Lesson 5 is a stand-alone nestjs project. Take a look at the ./lesson5-nestjs-mvc/src/purchase
directory for the goodies.
To run the sample web app, navigate to ./lesson5-nestjs-mvc
and run npm install && npm run start
.
There are two pages that use event sourcing:
localhost:3000/purchase
: Shows how to use event sourcing to create a new purchase, display a list of existing purchases and refund specific purchases.localhost:3000/purchase/report
: Demonstrates how to use projections to generate reports based off of events in the store.