Hey hope you’re doing great guys!!!
I was trying to use another way to connect forest to my db, right now I have the code from forest to connect to my DB :
module.exports = [{
name: 'default',
modelsDir: path.resolve(__dirname, '../src/models'),
connection: {
url: `${process.env.DATABASE_DIALECT}://${process.env.DATABASE_USERNAME}:${dbPassword}@${process.env.DATABASE_HOST}:${process.env.DATABASE_PORT}/${process.env.DATABASE_NAME}`,
options: { ...databaseOptions },
},
}];
but I want to create the DB connection by instanciate a Sequelize object and not by url (I did it for another project and that’s working well, but not working on forest API), is that possible? I’m working on Nodejs 12.
Thanks a lot guys!
- Express Version: ^4.17.1
- Sequelize Version: ~5.15.1
- Database Dialect: Postgres