Skip to content

Instantly share code, notes, and snippets.

@booo
Created August 10, 2011 17:17
Show Gist options
  • Save booo/1137489 to your computer and use it in GitHub Desktop.
Save booo/1137489 to your computer and use it in GitHub Desktop.
stupid pg test
pg = require "pg"
pg.connect "pg://postgres:secret@localhost:5432/testing", (error, client) ->
if error
console.log error
else
query = "SELECT NOW() AS when;"
client.query query, (error, result) ->
if error then console.log error
else console.log result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment