Javascript 连接失败nodejs postgreSQL
我正在尝试将我的NodeJS服务器连接到postgreSQL数据库,我正在使用sequelize进行连接,问题是我遇到以下错误:Javascript 连接失败nodejs postgreSQL,javascript,node.js,postgresql,sequelize.js,Javascript,Node.js,Postgresql,Sequelize.js,我正在尝试将我的NodeJS服务器连接到postgreSQL数据库,我正在使用sequelize进行连接,问题是我遇到以下错误: Possibly unhandled error: password authentication failed for user "FilipeCosta" at Connection.parseE (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:569:
Possibly unhandled error: password authentication failed for user "FilipeCosta"
at Connection.parseE (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:569:11)
at Connection.parseMessage (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:396:17)
at Socket.<anonymous> (C:\Users\FilipeCosta\desktop\FloraApp\server\node_modules\pg\lib\connection.js:132:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)
当我尝试使用./bin/www运行服务器时,我得到了这个eror,如sequelize页面中的教程所示
有什么帮助吗?你能用sequelize将你的代码粘贴到你连接到DB的地方吗?我解决了这个问题,我用新密码创建了一个新用户,但我仍然收到这个错误:未处理的拒绝错误:包含意外。元素必须是模型、关联或对象。
{
"development": {
"username": "postgres",
"password": "mypass",
"database": "myapp",
"host": "localhost",
"port": "5432",
"dialect": "postgres"
},
"test": {
"username": "root",
"password": null,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": null,
"database": "database_production",
"host": "127.0.0.1",
"dialect": "mysql"
}
}