I'm currently developing multiple node.js programs that all fall under the same project. These programs will share common code for things like connecting to a server, inserting to a database, and even logging to console. Ideally, I'd like to package all of these under one parent program, like how git does it - users execute 'git [command]' to run the program 'git-[command]'.
The problem is that there are programs to be run on the server, and programs to be run on the client - I'd like to keep these separate. There are also multiple programs that every server and client will need, but I'd like to keep these separate as well instead of just having 'server' and 'client' packages.
Is there any documentation for what I'm trying to do? Or, if what I'm trying to do is not recommended, what would you guys suggest instead?
Thanks!