Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
增加数据库连接错误提示
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuweiyou committed Jan 25, 2018
1 parent c20d279 commit 7e93b5e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions 头脑王者/src/database/mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ const db = mongoose.connect('mongodb://localhost/tnwz', {
})

db.once('open', () => console.log('连接数据库成功'))
db.on('error', err => console.error(err))

module.exports = db

0 comments on commit 7e93b5e

Please sign in to comment.