qas / examples-nodejs-cqrs-es-swagger Goto Github PK
View Code? Open in Web Editor NEWA Node.js CQRS and Event Sourcing Microservice Example Using Nest.js, Event Store, and Swagger
A Node.js CQRS and Event Sourcing Microservice Example Using Nest.js, Event Store, and Swagger
So far this is the most complete example of ddd+ event sourcing + cqrs I have seen for nest. Thank you ๐
One thing I would like to see is how you handle more aggregate roots?
Do they each get their own folder like user?
Also as a side note I think user is a bit too all encompassing of a domain.
Hi,
I'm trying to play around the boilerplate code and understand how is working the eventbus structure, but I have problems writing to the eventstore.
I've tried to console.log the functions from commands, command handlers, till the event handlers, and I can see that code works well until needs to write to the store.
console.log('444', 'goes here');
const result = await this.eventStore.client.writeEvent(streamName, type, event);
console.log('5555', 'never is shown this message');
I'm starting the project from bash with up.sh script and everything is ok, project running on 7070 port.
One issue I have on windows 10 with docker running in daemon mode the evenstore, so I need to go to docker settings and to expose daemon on port 2375 without TLS, this was like workaround to start the eventstore.
But, everything is hook-up and i can see that the connection to evenstore is established.
{ protocol: 'http',
hostname: 'eventstore',
tcpPort: 2113,
httpPort: 2113,
credentials: { username: 'admin', password: 'changeit' },
poolOptions: { min: 1, max: 10 } }
}
BR, Igor
how to deploy in heroku ?
tks
Hi ,
This this is best and most useful example of CQRS event source project example.Thanks a lot for your effort
Anyway i have an error in onEvent()
const content = result['atom:entry']['atom:content'][0];
^
TypeError: Cannot read property 'atom:entry' of null
Your article is great to introduce basic concept of CQRS ES
However, i think most of the people are actually confused on following topics:
Also, the detail of event Store should be added. Cause it will never work without the store.
E.g. Setup of Event Store by Docker
https://developers.eventstore.com/server/v5/server/installation/docker.html#run-with-docker
Thoughts on adding more examples on compensation sagas? maybe with some things rolling back to previous state on failure?
Dear @qas ,
maybe you can update this example repository to the latest nestjs version? There are a few breaking changes, and it would be helpful to have a look at your example.
All the best and thanks for your time
After i use create user command, it trigger command handler -> repo -> domain to apply userCreatedEvent, but then EventHandler can't catch the it and Saga also not work due to this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.