@@ -51,7 +51,7 @@ example with mongodb:
5151 snapshotsCollectionName: 'snapshots', // optional
5252 transactionsCollectionName: 'transactions', // optional
5353 timeout: 10000, // optional
54- emitStoreEvents: true // optional, by default no store events are emitted
54+ // emitStoreEvents: true // optional, by default no store events are emitted
5555 // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
5656 // authSource: 'authedicationDatabase' // optional
5757 // username: 'technicalDbUser' // optional
@@ -70,8 +70,8 @@ example with redis:
7070 prefix: 'eventstore', // optional
7171 eventsCollectionName: 'events', // optional
7272 snapshotsCollectionName: 'snapshots', // optional
73- emitStoreEvents: true, // optional, by default no store events are emitted
7473 timeout: 10000 // optional
74+ // emitStoreEvents: true, // optional, by default no store events are emitted
7575 // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
7676 // password: 'secret' // optional
7777 });
@@ -85,7 +85,7 @@ example with tingodb:
8585 snapshotsCollectionName: 'snapshots', // optional
8686 transactionsCollectionName: 'transactions', // optional
8787 timeout: 10000, // optional
88- emitStoreEvents: true // optional, by default no store events are emitted
88+ // emitStoreEvents: true, // optional, by default no store events are emitted
8989 // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
9090 });
9191
@@ -99,7 +99,7 @@ example with elasticsearch:
9999 snapshotsTypeName: 'snapshots', // optional
100100 log: 'warning', // optional
101101 maxSearchResults: 10000, // optional
102- emitStoreEvents: true // optional, by default no store events are emitted
102+ // emitStoreEvents: true, // optional, by default no store events are emitted
103103 // maxSnapshotsCount: 3 // optional, defaultly will keep all snapshots
104104 });
105105
@@ -594,8 +594,12 @@ But if you want you can trigger this from outside:
594594 });
595595
596596## Catch before and after eventstore events
597+ Optionally the eventstore can emit brefore and after events, to enable this feature set the ```emitStoreEvents``` to true.
598+
597599 var eventstore = require('eventstore');
598- var es = eventstore();
600+ var es = eventstore({
601+ emitStoreEvents: true,
602+ });
599603
600604 es.on('before-clear', function({milliseconds}) {});
601605 es.on('after-clear', function({milliseconds}) {});
0 commit comments