连接失败nodejs postgreSQL

时间:2017-05-12 10:15:33

标签: 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: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)

我认为它可能与我的连接配置有关:

{
  "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"
  }
}

当我尝试使用./bin/www运行我的服务器时,我感到很恐怖,如续集页面中的教程所示。

任何帮助?

0 个答案:

没有答案