3

Nodejs Codebase Question - packages, submodules, services

 2 years ago
source link: https://dev.to/florinrelea/nodejs-codebase-question-packages-submodules-services-283g
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Florin Relea

Posted on Nov 25

Nodejs Codebase Question - packages, submodules, services

This is how a part of my codebase looks like:

Those are the problems that I encountered while using this type of codebase:

  • The packages are changed pretty often and the publish / install process is a slow process
  • If I don't make sure that the database models package version is the same across all packages, I end up with 2 versions of the database models package which throw the following error: Cannot overwrite model once compiled

Possible solutions

I've been thinking about migrating to a monolithic application but I am not really sure.

Another possible solution would be to use git submodules but this has downsides as well.


Is there a better way of handling this system? What do you think?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK