Created
June 17, 2018 09:27
-
-
Save fdjones/a5abb07466141588dd401fb397409043 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const { Client } = require('pg') | |
const client = new Client() | |
await client.connect() | |
const res = await client.query('SELECT $1::text as message', ['Hello world!']) | |
console.log(res.rows[0].message) // Hello world! | |
await client.end() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment