Popularity
5.2
Declining
Activity
3.7
Stable
10
4
1

Monthly Downloads: 158
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web    
Latest version: v9.0.2

nested-routes alternatives and similar packages

Based on the "Web" category.
Alternatively, view nested-routes alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of nested-routes or a related project?

Add another 'Web' Package

README

Logo

routes :: RouterT (MiddlewareT m) sec m ()
routes = do
  matchHere $ action $ do
    get $ do
      json ("some cool json", True, 12) -- application/json
      text "Yo" -- text/plain
  matchGroup (l_ "someChunk" </> o_) $ do
    match (p_ "some parser" Attoparsec.doube </> o_) $ \(d :: Double) -> -- "/someChunk/124.234" would match
      action $ ...
    matchGroup (r_ [regex|/^(\.)+(.*)/|] </> o_) $ \(matches :: [String]) -> -- "/someChunk/....huh?" would match
      action $ ...


myMiddleware :: MiddlewareT m
myMiddleware = route routes