Hello everyone!
This question is related to using Sequelize with Node.js and MySQL. I have come across a small doubt and need your help.
To enable CLS with Sequelize we initialize a CLS namespace using the following lines of code:
const cls = require('continuation-local-storage');
const namespace = cls.createNamespace('custom-sequelize-namespace');
const Sequelize = require('sequelize');
Sequelize.useCLS(namespace);
const sequelize = new Sequelize(/* … */);
So my question is in which file do I have to add this code? index.js or all the model files?