a_sid
0
Q:

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}`)
0

New to Communities?

Join the community