Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to connect next js with postgresql localhost

const pgp = require('pg-promise')();

// Get the values for these variables from configuration
const user = ...
const password = ...
const host = ...
const port = ...
const database = ...

const db = pgp(`postgres://${user}:${password}@${host}:${port}/${database}`)
Source by www.codeoftheprogrammer.com #
 
PREVIOUS NEXT
Tagged: #connect #js #postgresql #localhost
ADD COMMENT
Topic
Name
1+5 =