haskell-servant/servant

Dynamic routing

Open

#634 opened on Nov 7, 2016

View on GitHub
 (17 comments) (0 reactions) (0 assignees)Haskell (1,953 stars) (422 forks)batch import
enhancementhelp wanted

Description

Is there a way (currently) to build a dynamic route at runtime out of static routes? I'm imagining a simple use case where you want to serve the same API with different URL roots, say /production/api/... and /test/api. You could parameterize your server on top-level path and server the API from there. But I can't think of a way to dynamically build a route.

Contributor guide