Situation: I have a node.js library that uses sequelize to define and export models. In my backend app I use this library. This backend app also needs to access to stuff exported by sequelize.
Question: What is the correct way of accessing sequelize from my backend app?
- I can add sequelize into my backend app's dependencies in package.json, but then if versions don't match some weird things start to happen. This is also hard to maintain, as I have many backend apps and I always have to manually keep track of versions.
- I can access it via
import sequelize from "boxlock-common-server/node_modules/sequelize"; - ?
What is the correct way of doing this?