Shared db across services
Hey folks - we have two services that need access to the same database (a client facing API and our web app). I don't really want to setup a monorepo. I think my best bet is to either setup a shared git submodule or a private npm package?
What's the best approach here for creating this + running migrations? Rn I'm literally copying and pasting code across the projects and want something a little more put together and in sync.
Thanks!
1 Reply
Submodule, private package, and monorepo are all good options. You could also consider using introspection on one of the two projects with the other being the source of truth where you handle the migrations