Created
May 14, 2020 08:39
-
-
Save urcoilbisurco/f42fcfc9e9bd04317507c8bfb724e9c2 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
import { Client } from "https://deno.land/x/postgres/mod.ts"; | |
async function main() { | |
const client = new Client({ | |
user: "user", | |
database: "test", | |
host: "localhost", | |
port: "5432" | |
}); | |
await client.connect(); | |
const result = await client.query("SELECT * FROM people;"); | |
console.log(result.rows); | |
await client.end(); | |
} | |
main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment