更新时间:2022-03-04 21:23:43
更多的探索表明以下内容可以解决问题:
A bit more exploration shows the following will do the job:
new Sequelize('mydb', undefined, undefined, {
host: '/var/run/postgresql',
dialect: 'postgres'
});
实际连接由包 'pg' 处理,这在 中有记录问题.
The actual connection is handled by the package 'pg' and this was documented in an issue.
注意,我已经测试过它可以与 pg@6.4.1 和 sequelize@4.4.2 一起使用.
Note, I have tested this to work with pg@6.4.1 and sequelize@4.4.2.