Monday, 23 April 2018

Dialect needs to be explicitly supplied as of v4.0.0

Hello, there! I'm trying to connect to my PostgreSQL server and it seems something wrong is happening with Sequelize connection. I can't figure out what it is. I'm providing the dialect, but it doesn't work...Dialect error screenshotsequelize.jsconst config = require("config") const Sequelize = require("sequelize") const sequelize = new Sequelize( config.get("postgres.database"), config.get("postgres.username", config.get("postgres.password"), { host: config.get("postgres.host"), dialect: "postgres", operatorsAliases: false, pool: { max: 5, min: 0, acquire: 30000, idle: 10000 } }) ) sequelize .authenticate() .then(() => { console.log("Connection has been established successfully.") }) .catch(err => { console.error("Unable to connect to the database:", err) }) module.exports = sequelize

Submitted April 23, 2018 at 07:49PM by giocruz

1 comment: