I was finally able to get it working. Most of the solutions I found online were like this:
"development": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
},
"production": {
"use_env_variable": "DATABASE_URL",
"dialect": "postgres"
}
}
They're mostly using config.json files. I used a config.js file instead and wrote the dialect option as an object like this instead
dialect: { dialect: 'postgres' }
or just add it to the index.js file in the models directory of the sequelize project like this:
const sequelize = new Sequelize(config.development.url, {dialect: 'postgres', });