Can I run multiple Workers on the same port with `wrangler dev`?

Is there a way to run multiple Workers locally on the same port on my computer or can I only run one Worker per port at a time?

During local development I am proxying my frontend requests to port 8787. If I want to run multiple Workers at the same time, then I have to run each Worker on a different port. Obviously that won’t work since my frontend requests are all being sent to port 8787.

Thank you!

I’m not sure it’s possible client side. They would need to run multiple workers on different routes on the same port via Wrangler. At the moment it’s tough.

You could run a reverse proxy locally to the various Workers ports depending on path/domain you use.

This topic was automatically closed after 31 days. New replies are no longer allowed.