node.js - What is correct initialization for sequalize? -


i want use transactions , requests pooling. i've seen sequalize has pooling support, have question - have manually re-create sequalize object each request? mean:

// main app context var sequelize = require('sequelize');  // request handler context function handle(req, res) {     var sequelize = new sequelize('helpdesk', 'root'); } 

or can initialize sequelize object once , use everywhere?


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -