Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks a lot for your answer, but doesn't that mean that the core issue is just pushed one level of indirection? If each of our "mountable app" NPM package includes this new "DB" package as a dependency, they will all at some point have a nested Mongoose instance each in their respective `node_modules` which all need to be connected to MongoDB? My current assumption being that it is not enough for the root/host application to declare a dependency towards this DB package that its other NPM packages can `require`. Sorry if I misinterpreted you.
      singulars
    2. COOh sorry, I was confused. I thought you were just creating reusable modules, not actual NPM packages that you were installing. NPM is really for sharing packages between projects, not creating modules within a single project. What are you hoping to gain that using regular modules don't solve? It would seem to me that you will be duplicating lots of things going down the NPM path.
      singulars
    3. COAdded a small clarification to my question. The rationale for using NPM packages is that they are easily declared as dependencies of the host, in this case, with simple versioning so that multiple hosts can use different versions of the same sub-app directly from its `package.json`. The actual NPM packages have their own Git repos and development life-cycles, but I guess we could use Git sub-modules instead of managing them through the host `package.json`? Or is there another smart way of reusing modules?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload