haskell-servant/servant

Dynamic routing

Open

#634 opened on Nov 7, 2016

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

Repository metrics

Stars
 (1,953 stars)
PR merge metrics
 (Avg merge 5h 49m) (2 merged PRs in 30d)

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