node-postgres/test/integration/password-connection-tests.js
2010-10-22 18:28:10 -05:00

23 lines
387 B
JavaScript

require(__dirname + '/test-helper');
var client = new Client({
database: 'postgres',
user: 'user_pw',
password: 'pass'
});
client.connect();
client.on('message', function(msg) {
console.log('message: ' + msg.name);
});
var query = client.query('select * from pg_type');
query.on('row', function() {
console.log('row');
});
query.on('end', function() {
client.end();
});