这行不通:
// config/env/production.js
models: {
mymodel: {
connection: 'some-connection'
}
}
使用
//api/models/MyModel.js
connection: sails.config.mymodel &&
sails.config.mymodel.connection ?
sails.config.mymodel.connection :
'fallback-connection';