Answer the question
In order to leave comments, you need to log in
What causes the nodejs client password must be a string error?
How to fix the error?
const Pool = require('pg').Pool
const pool = new Pool({
user:'postgres',
pasword:'password',
host:'localhost',
port:5432,
database:'delviery'
});
pool.connect();
pool.query('SELECT * FROM USERS', (err, result) => {
if(!err) {
console.log(result);
} else {console.log(err)}
})
pool.end();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question