The waitra package

[ Tags: library, mit, web ] [ Propose Tags ]

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.

echoRoute :: Route
echoRoute = routeGet (echoApp <$ string "/api/echo/" <*> many anySym)
 where echoApp msg _req respond = respond $ responseLBS status200 [] (fromString msg)

app :: Application
app = waitraMiddleware [echoRoute] $ staticApp $ embeddedSettings $(mkRecursiveEmbedded "static")

[Skip to Readme]

Properties

Versions 0.0.1.0, 0.0.2.0, 0.0.3.0, 0.0.4.0
Dependencies aeson (>=0.8.0.2), base (>=4.6 && <4.10), bytestring (>=0.10.4.0), directory (>=1.2.1.0), filepath (>=1.3.0.2), http-types (>=0.8.6), regex-applicative (>=0.3.1), template-haskell, text (>=1.1.0.0), wai (>=3.0.2.3), wai-app-static (>=3.0), waitra, warp [details]
License MIT
Copyright (c) 2015 Futurice
Author Oleg Grenrus <oleg.grenrus@iki.fi>
Maintainer Oleg Grenrus <oleg.grenrus@iki.fi>
Category Web
Home page https://github.com/futurice/waitra
Source repository head: git clone git://github.com/futurice/waitra.git
Uploaded Tue Sep 1 05:15:30 UTC 2015 by phadej
Updated Fri Jun 3 17:18:23 UTC 2016 by phadej to revision 2
Distributions LTSHaskell:0.0.4.0, NixOS:0.0.4.0, Tumbleweed:0.0.4.0
Executables waitra-example
Downloads 675 total (9 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-09-01 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
examples

Build example executables

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for waitra-0.0.4.0

[back to package description]

Waitra

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.

Build Status

Synopsis

echoRoute :: Route
echoRoute = routeGet (echoApp <$ string "/api/echo/" <*> many anySym)
  where echoApp msg _req respond = respond $ responseLBS status200 [] (fromString msg)

app :: Application
app = waitraMiddleware [echoRoute] $ staticApp $ embeddedSettings $(mkRecursiveEmbedded "static")

Documentation

Documentation is available at hackage.