Updated mongo

This commit is contained in:
dbroqua 2019-12-25 18:36:55 +01:00
parent 07c37f396f
commit 021c326fae

View file

@ -36,7 +36,9 @@ const schemas = {
const Histories = mongoose.model('histories', schemas.histories) const Histories = mongoose.model('histories', schemas.histories)
const Metadata = mongoose.model('metadata', schemas.metadata) const Metadata = mongoose.model('metadata', schemas.metadata)
mongoose.connect(config.mongoUrl, { useNewUrlParser: true, useUnifiedTopology: true, debug: true }) mongoose.set('debug', true)
mongoose.connect(config.mongoUrl, { useNewUrlParser: true, useUnifiedTopology: true })
const db = mongoose.connection const db = mongoose.connection
db.on('error', console.error.bind(console, 'connection error:')) db.on('error', console.error.bind(console, 'connection error:'))