how to connect next js with postgresql localhost code example
Example: 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}`)