node.js - Share a database connection pool between sequelize and pg -


i have server i've written using express , node-postgres (pg). creates own db pool:

const dbpool = new pg.pool(dbconfig); 

and runs sql queries directly using connection.

now i'm adding new table , corresponding rest api. i'd use sequelize , epilogue reduce boilerplate. unfortunately, sequelize wants create own database connection pool:

const sequelize = new sequelize(database, user, password, config); 

is possible re-use existing connection pool or otherwise share between existing pg code , new sequelize code?


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -