1

I have a postgres datatbase set up and I installed PostgreSQL and knex.js in my node.js server file and added the code to connect to my database but everytime I use postman to see if im able to add users I get this error message

const db= knex
({

client
 :'pg',

connection:{

host:'127.0.01',

user:'',

password:'',

database:'smartbrain'

}

});


app.post('/register',(req,res)=>{

const {email,name,password}=req.body;

db('user').insert({

email:email,


name:name,

joined:new Date()

})
.then(console.log())
Shubham Dixit
  • 9,242
  • 4
  • 27
  • 46
  • You are obviously passing wrong credentials ,its self explainatory. – Shubham Dixit May 09 '19 at 09:42
  • Possible duplicate of [Postgresql: password authentication failed for user "postgres"](https://stackoverflow.com/questions/7695962/postgresql-password-authentication-failed-for-user-postgres) – Mikael Lepistö May 09 '19 at 12:39

0 Answers0