thenativeweb / cqrs-sample

CQRS, EventSourcing, (DDDD) Sample in node.js
148 stars 50 forks source link

Error while trying to change inMemory eventStore to mongodb #26

Closed dkt201474 closed 6 years ago

dkt201474 commented 6 years ago

Hi @adrai , Thank you for your sample,

I don't know if mongodb has changed it's "connect" function interface, but when I change the type of eventStore from "inMemory" to "mongodb", I get the following error:

_.../node_modules/mongodb/lib/mongo_client.js:241 throw new TypeError('connect only accepts a callback');_

I'm using mongodb in local.

adrai commented 6 years ago

Will look at it later... Just saw they released a new major version: https://github.com/mongodb/node-mongodb-native/blob/HEAD/CHANGES_3.0.0.md Can you try with mongodb 2.x ?

dkt201474 commented 6 years ago

Same thing with mongoDB version: 2.6.2

adrai commented 6 years ago

I updated all cqrs modules, now it should work

dkt201474 commented 6 years ago

Yes it works perfectly now. Thank you for the quick replies.