I am using the latest version of sequelize and my server/config/config.json
file is configured as follows:
{
"development": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
},
"test": {
"use_env_variable": "DATABASE_TEST_URL",
"dialect": "postgres"
},
"production": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
}
}
My .env file is configured as follows:
DATABASE_URL = "MY database URL Here"
When I run sequelize db:migrate
I get the following:
Error parsing url: undefined
You aren't defining the variable $DATABASE_URL.
Try this in terminal:
export DATABASE_URL=postgresql://[user[:password]@][netlocation][:port][/dbname]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With