3 Star 5 Fork 5

云丶起 / jtopo-site

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dbtest.js 644 Bytes
一键复制 编辑 原始数据 按行查看 历史
wangdeyu 提交于 2014-11-28 11:16 . first commit
var mysql = require('mysql');
var option = {
host : 'sqld.duapp.com',
port : 4050,
user : '61Lhhx78F15O3Fr8KMLPuQ8Z',
password : 'ciL8LEMTrlWguRxjgWC9fnZS20hhcXKt',
database : 'UUQJMItxeMZumdKbeHSH'
};
function getConnection(callback){
var connection = mysql.createConnection(option);
connection.connect(function(err){
if (err) {
callback('connect error');
return;
}
});
connection.on('error',function(err) {
if (err.errno != 'ECONNRESET') {
throw err;
} else {
// do nothing
}
});
return connection;
}
exports.getConnection = getConnection;
HTML
1
https://gitee.com/cloud-fly/jtopo-site.git
git@gitee.com:cloud-fly/jtopo-site.git
cloud-fly
jtopo-site
jtopo-site
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891