Closed hacke2 closed 8 years ago
I connect db :
var orm = require("orm"), db = null, opts = { database: "inspiration", protocol: "mysql", host: "127.0.0.1", port: 3306, username: "root", password: "root1111", query: { debug : false, pool: true } }; console.info('connecting'); try { db = orm.connect(opts); console.info('connect success'); }catch(err) { console.error('connect error', err); } module.exports = db;
the password is incorrect but app console success, only if db server stop it console error, why?
the console should in callback
I connect db :
the password is incorrect but app console success, only if db server stop it console error, why?