2017-09-13 22 views
0

我的postgres數據庫已設置爲使用同級身份驗證,我不知道如何告訴Sequelize使用此方法?Postgres的續集和同行認證?

目前我們使用的是以下幾點:

new Sequelize("postgres://127.0.0.1/dbname", {}); 

我也試過,沒有工作

new Sequelize("postgresql:///dbname?host=/var/lib/postgresql"); 

在這兩種情況下,接下來,我得到的錯誤:

SequelizeBaseError: password authentication failed for user" 

燦有人幫忙嗎?更

回答

0

有點勘探顯示以下將做的工作:

new Sequelize('mydb', undefined, undefined, { 
    host: '/var/run/postgresql' 
    dialect: 'postgres' 
    }); 

實際的連接是由包「PG」處理,這是在一個issue記錄。

請注意,我已經測試過這個版本,可以使用[email protected][email protected]

相關問題