I built a simple project A that uses Entities and Typeorm that must run on its own server instance, and that works fine. My problem is that I must build another project B that runs on another server instance and connects to the same database as project A, sharing some entity with it, just reading them, or creating new relations.
I haven't done it before but after googling and thinking about it I've come to these possible solutions:
- copy/past the entities as classes (a lot of problems ahead)
- keep working on project A and expose different api according to environmental variables
- npm workspaces
- monorepo
- Nx/Turborepo
Considering that I'm still new to Nest, so I'll have to study any solution, what's in your opinion the most simple that won't make me regret it?