I
I
Igorek982021-06-08 16:40:25
PostgreSQL
Igorek98, 2021-06-08 16:40:25

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();

60bf731faebeb269669994.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2021-06-08
@Igorek98

password:'password',

Are you sure you don't notice anything?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question