event-sourcing-nestjs
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -13,8 +13,17 @@ "use strict"; | ||
const eventstore = require("eventstore"); | ||
const url = require("url"); | ||
class EventStore { | ||
constructor(mongoURL) { | ||
this.eventStoreLaunched = false; | ||
let ssl = false; | ||
const parsed = url.parse(mongoURL, true); | ||
if (parsed.query && parsed.query.ssl !== undefined && parsed.query.ssl === 'true') { | ||
ssl = true; | ||
} | ||
this.eventstore = eventstore({ | ||
type: 'mongodb', | ||
url: mongoURL, | ||
options: { | ||
ssl: ssl, | ||
}, | ||
}); | ||
@@ -21,0 +30,0 @@ this.eventstore.init(err => { |
{ | ||
"name": "event-sourcing-nestjs", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "NestJS module for implementing Event Sourcing.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
52040
620