22 lines
329 B
JavaScript
22 lines
329 B
JavaScript
var pg = require('pg');
|
|
|
|
function onConnect(err, client, done) {
|
|
if (err) {
|
|
console.error(err);
|
|
process.exit(1);
|
|
}
|
|
|
|
client.end();
|
|
}
|
|
|
|
exports.connTest = function () {
|
|
|
|
pg.connect(Connections.pg_sjy_gis, function (err, db) {
|
|
if (err) {
|
|
console.log(err);
|
|
process.exit(0);
|
|
} else {
|
|
console.log('ok');
|
|
}
|
|
});
|
|
}; |