Created
March 21, 2020 16:37
-
-
Save mesaglio/0c1e23cf6bebc2d50ad539fc296291b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Sequelize = require('sequelize'); | |
var pool; | |
module.exports = { | |
getPool: function() { | |
if (pool) { | |
console.log('pool viejo '); //+ pool); | |
return pool; | |
} | |
pool = new Sequelize('mysql://root:root@localhost:3306/pdep', { | |
pool: { | |
max: 5, | |
min: 0, | |
acquire: 30000, | |
idle: 10000 | |
} | |
}); | |
console.log('Primera conexion '); //+ pool); | |
return pool; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment