cucumber-ltd / plutonium

CQRS / EventSourcing for JavaScript
0 stars 1 forks source link

Push PG pool creation down into the PgEventStore #3

Open jbpros opened 6 years ago

jbpros commented 6 years ago

At the moment, the store expects its pool to be injected. It should deal with connecting to Postres itself (the pool constructor should still be injected).

pgPool = getPgPool(config.databaseUrl(), config.databaseSSL())
eventStore = new PgEventStore({
  pgPool,
  logError,
  deserialize,
  tableName: 'events',
})
jbpros commented 6 years ago

We're not sure yet this is needed, really :)