I'm looking for a way to replicate worker wrangler.toml/routes in local dev mode
Probably not possible with wrangler only. Maybe it's possible with miniflare, zero trust and/or WARP client?
5 Replies
@Varna did you ever figure out how to do this? I joined the Discord specifically because I had this question too.
Sorry for late reply @knoblauchbrot
I did not, but I'm using Vite, so I set up Vite proxy instead.
The setup is this:
On Production, the normal flow is that my server
.use()
client bundle to serve client app on same worker.
On Development, my front-end (Vite) server uses proxy
feature, to serve /api
routes on same domain (localhost).
I don't remember If I had used any additional properties. atm in countryside
No worries @Varna, appreciate you responding at all 👍
Gotcha, thanks. Unfortunately, not an option in my case, but thank you for sharing this, might help someone else 🤝