Added debug mongo
This commit is contained in:
parent
3ed371fbda
commit
07c37f396f
1 changed files with 1 additions and 1 deletions
2
mongo.js
2
mongo.js
|
@ -36,7 +36,7 @@ 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 })
|
mongoose.connect(config.mongoUrl, { useNewUrlParser: true, useUnifiedTopology: true, debug: 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:'))
|
||||||
|
|
Loading…
Reference in a new issue