7.1.0 • Published 3 years ago
hebo v7.1.0
hebo
Simple CQRS / Event Sourcing Container
Table of Contents
Install
npm:
npm install hebo
yarn:
yarn add hebo
Usage
// Meant to be done at require time
const Hebo = require('hebo');
const libraryAggregate = require('./path/to/my/libraryAggregate');
const bookAggregate = require('./path/to/my/bookAggregate');
const hebo = new Hebo({
aggregates: {
library: libraryAggregate,
book: bookAggregate,
}
})
// ... and then do this at runtime:
const { getProjection, runCommand, updateSnapshot } = hebo.connect({
eventRepository,
snapshotRepository,
notificationHandler,
authorizer,
user,
});
await runCommand('createLibrary', 1234);
await runCommand('setLibraryName', 1234, 'North Branch');
const library = getProjection('library', 1234);
await updateSnapshot('library', 1234);
Contributors
Name |
---|
Steve Caldwell |
License
MIT © Steve Caldwell
7.1.0
3 years ago
7.0.0
5 years ago
6.0.0
5 years ago
5.1.0
5 years ago
5.0.2
5 years ago
5.0.1
5 years ago
5.0.0
5 years ago
4.1.0
5 years ago
4.0.0
6 years ago
3.0.0
6 years ago
2.1.0
6 years ago
2.0.0
6 years ago
1.0.0
6 years ago
0.4.1
6 years ago
0.3.4
6 years ago
0.3.3
6 years ago
0.3.2
6 years ago
0.3.0
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.0
6 years ago