Created
November 19, 2010 17:47
-
-
Save brianc/706852 to your computer and use it in GitHub Desktop.
debugging node postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Client = require(__dirname + '/node-postgres/lib').Client; | |
var client = new Client({ | |
host: '1.0.1.1', | |
port: 6543, | |
user: 'Kev', | |
database: 'dev', | |
password: '...' | |
}); | |
client.connection.on('message', function(msg) { | |
console.log(msg.name) | |
}) | |
client.connection.on('connect', function() { | |
console.log('connected') | |
}) | |
client.connection.stream.on('connect', function() { | |
console.log('stream connected') | |
}) | |
client.connect(); | |
client.on('drain', client.end.bind(client)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks!