im trying to connect with postresql i have pgadmin3 installed and cant connect to server but when my nodejs code tries to connect it spits out this error :password authentication failed for user "sean"; this is the code that i am usingconst connect = "postgres://postgres:password@localhost/karls" const router = express.Router(); var pool = new pg.Pool(connect); router.route("/").get((req, res) => { pool.connect(function(err, client, done){ if(err) return console.error("the error ocurred on: " + err); client.query("SELECT * FROM Recipe", function(err, result) { if(err) console.error(error); done(); console.log(results) }) }) }); anyone have any ideas why this is?
Submitted May 05, 2018 at 12:37PM by SeanCarroll17
No comments:
Post a Comment