WIP
This commit is contained in:
parent
2d0938c1e5
commit
d2cb7e8a07
7 changed files with 44 additions and 36 deletions
|
|
@ -1,6 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
var pg = require('pg');
|
||||
var logger = require('./logger');
|
||||
|
||||
var PG_ERRORS = {
|
||||
23505: 'uniqueViolation'
|
||||
};
|
||||
|
|
@ -11,9 +13,7 @@ var PostgresqlInterface = function (conString) {
|
|||
}
|
||||
|
||||
this.client = new pg.Client(conString);
|
||||
|
||||
// TODO better logging
|
||||
this.client.on('error', function (err) { console.log(err); });
|
||||
this.client.on('error', function (err) { logger.error(err); });
|
||||
|
||||
this.client.connect();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue