waitra-0.0.4.0: A very simple Wai router

Copyright(c) 2015 Futurice
LicenseMIT (see the file LICENSE)
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.Waitra

Contents

Description

Network.Waitra is a very simple router. It's useful for writing simple API web-services, when you don't want to use the whole Yesod stack.

Synopsis

Types

type Path = String Source

We use strings, as - unluckily - Applicative doesn't work with Text directly.

data Route Source

Constructors

Route Method (RE Char Application) 

Static paths routes

Regex paths routes

JSON helper

Compilation

waitraMiddleware :: [Route] -> Middleware Source

Turn the list of routes into Middleware

Re-exports