Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

postgresql nodejs

const { Client } = require('pg')const client = new Client();(async () => {  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()})()
Source by node-postgres.com #
 
PREVIOUS NEXT
Tagged: #postgresql #nodejs
ADD COMMENT
Topic
Name
4+4 =