Split Router code into parts

Is there any way to split Router code into few files or at least merge N routers into one?

I think You can use forward for this…

Plug.Router supports match "pattern", to: SomeRouter" which is like forward but doesn’t strip the matching path segments from the request.

Edit: an example Umbrella App routing with Plug.Router app & Phoenix app

1 Like

I read the doc. The issue is that Plug chain parsed twice and plus forward “eats” matching path info.

@mbuhot solution might fit your need better.

Awesome! :heart_eyes: