
"Your production environment has a smart edge router: Akamai, Cloudflare, nginx, whatever, that maps URL paths to different frontend applications: It works beautifully in production. Then you open your laptop. Each app runs on its own port, and suddenly you're managing this: Two things break immediately: Cross-app links stop working. If app A renders <Link href="/ads/123">, that link resolves relative to localhost:3001; wrong app, wrong port. You either hardcode ports in your local env vars, or you just accept that links are broken locally."
"Starting everything is a chore. Feature work that spans two apps means two terminals, two npm run dev commands, and memorizing which port does what. Add a third app and it gets worse. You can't replicate your edge infrastructure locally. It's a cloud service. But you don't need to. You need something much smaller."
"Instead of reaching for Docker Compose + nginx (which works, but is heavy and requires maintaining config that mirrors production), we built a small tool called Olympus: a Node.js HTTPS reverse proxy paired with a bash orchestration script. It does the following things: Path-based routing: all apps are reachable under one local domain, with each URL path forwarded to the correct app, just like a monolith."
"API proxying without CORS: apps call a local /api-proxy route instead of hitting the staging API directly. The proxy forwards those requests, so the app never makes a cross-origin request. API mocking: a flag swaps the staging API for a local Mockoon instance,"
A micro-frontend setup maps URL paths to separate frontend applications in production, but local development breaks cross-app navigation because links resolve to the wrong localhost ports. Starting multiple apps also becomes cumbersome, especially when feature work spans several repositories. Replicating edge infrastructure locally is difficult because it is provided by cloud services. A purpose-built local tool called Olympus provides a Node.js HTTPS reverse proxy plus a bash orchestration script. It routes requests by URL path under one local domain, forwards API calls through a local /api-proxy endpoint to avoid cross-origin requests, and can mock APIs by switching from the staging API to a local Mockoon instance.
Read at DEV Community
Unable to calculate read time
Collection
[
|
...
]