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