Hello everyone, I've been delving into the world of monorepos and exploring some intriguing monorepo tools like Nx and Turborepo. I'm quite curious to learn about how you all manage your monorepos.
Currently, I'm working on a personal project that leverages Kubernetes and Skaffold for building and deploying my NestJS, python, and Next.js microservices. I've set up ingress for traffic routing to avoid the hassle of specifying unique ports for accessing my APIs. However, I've encountered a few challenges with this setup:
-
Code Sharing: While I understand that I could use npm to publish my libraries, I find it cumbersome to have to republish the library every time I want to debug or test new changes.
-
Slow Refreshing with Skaffold: Skaffold has been a helpful tool for local Kubernetes development, as it ensures that changes take effect without requiring the reapplication of Kubernetes objects. This approach is also language-agnostic. However, I've noticed that it can be slow, particularly when dealing with a large number of microservices that need to run simultaneously.
I've been contemplating using Nx since it does address some of the issues I've had with my monorepo, but I've struggled to find a suitable example for translating my Kubernetes setup, especially the ingress part, into Nx. This is crucial for me because I want to reroute all my microservices to a shared domain (e.g., http://foo.dev) instead of having to specify http://localhost:3000, http://localhost:3001, and so on for local development.