Solution for me was based on what I had set for my NODE_ENV
variable.
echo $NODE_ENV
If you do not have anything set for that variable, try setting it with the following:
export NODE_ENV=development
If a value is present, make sure you have an entry in your config file for that value. For me, I like to use local
. So I had to update my config to this:
{
local: {
username: 'root',
password: null,
database: 'database_dev',
host: '127.0.0.1',
dialect: 'postgres'
},
development: {
username: 'root',
password: null,
database: 'database_dev',
host: '127.0.0.1',
dialect: 'postgres'
},
test: {
username: 'root',
password: null,
database: 'database_test',
host: '127.0.0.1',
dialect: 'postgres'
},
production: {
username: 'root',
password: null,
database: 'database',
host: '127.0.0.1',
dialect: 'postgres'
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…