我有一个如下所示的knexfile:
module.exports = {
testing: {
client: 'postgresql',
connection: {
database: 'poker_handsdb'
},
pool: {
min:2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
},
development: {
client: 'postgresql',
connection: {
database: 'poker_handsdb',
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
},
production: {
client: 'postgresql',
connection: {
database: 'poker_handsdb',
},
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
}
};
我将应用程序部署到了heroku,当我尝试运行knex migration:latest时,出现以下错误: 连接ECONNREFUSED 127.0.0.1:5432
要让生产版本在heroku上运行,我需要指定什么作为主机/数据库?我试图在heroku上运行本地托管的postgres实例是否有意义?