name: apiary version: 1.1.3 synopsis: Simple and type safe web framework that can be automatically generate API documentation. description: Simple and type safe web framework that can be automatically generate API documentation. . @ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} . import Web.Apiary import Network.Wai.Handler.Warp import qualified Data.ByteString.Lazy.Char8 as L . main :: IO () main = runApiary (run 3000) def $ do [capture|/age::Int|] . ([key|name|] =: pLazyByteString) . method GET . action $ do (age, name) <- [params|age,name|] guard (age >= 18) contentType "text/html" mapM_ lazyBytes ["<h1>Hello, ", name, "!</h1>\\n"] @ . @ $ curl localhost:3000 404 Page Notfound. $ curl 'localhost:3000/20?name=arice' <h1>Hello, arice!</h1> $ curl 'localhost:3000/15?name=bob' 404 Page Notfound. $ curl -XPOST 'localhost:3000/20?name=arice' 404 Page Notfound. @ . * High performance(benchmark: ). . * Nestable route handling(Apiary Monad; capture, method and more.). . * Type safe route filter. . * Auto generate API documentation(example: ). . more examples: . live demo: (source code: ) license: MIT license-file: LICENSE author: HirotomoMoriwaki maintainer: HirotomoMoriwaki Homepage: https://github.com/philopon/apiary Bug-reports: https://github.com/philopon/apiary/issues copyright: (c) 2014 Hirotomo Moriwaki category: Web build-type: Simple stability: stable extra-source-files: static/api-documentation.min.js , static/jquery.cookie-1.4.1.min.js , static/api-documentation.min.css , static/jquery-2.1.1.min.js , static/bootstrap.min.css , static/bootstrap.min.js , CHANGELOG.md cabal-version: >=1.10 flag wai3 description: use wai-3.0 default: True library exposed-modules: Web.Apiary Web.Apiary.Heroku Web.Apiary.Wai Control.Monad.Apiary Control.Monad.Apiary.Filter Control.Monad.Apiary.Action Data.Apiary.Extension Data.Apiary.Param Data.Apiary.Dict Data.Apiary.Method Data.Apiary.Compat Data.Apiary.Document Data.Apiary.Document.Html other-modules: Data.Apiary.Document.Internal Data.Apiary.Extension.Internal Control.Monad.Apiary.Internal Control.Monad.Apiary.Filter.Internal Control.Monad.Apiary.Action.Internal Control.Monad.Apiary.Filter.Internal.Capture Control.Monad.Apiary.Filter.Internal.Capture.TH build-depends: base >=4.6 && <4.8 , template-haskell >=2.8 && <2.10 , transformers >=0.2 && <0.5 , transformers-base >=0.4 && <0.5 , mtl >=2.1 && <2.3 , monad-control >=0.3 && <0.4 , exceptions >=0.6 && <0.7 , http-types >=0.8 && <0.9 , mime-types >=0.1 && <0.2 , text >=1.1 && <1.3 , bytestring >=0.10 && <0.11 , bytestring-lexing >=0.4 && <0.5 , blaze-builder >=0.3 && <0.4 , blaze-html >=0.7 && <0.8 , blaze-markup >=0.6 && <0.7 , case-insensitive >=1.1 && <1.3 , data-default-class >=0.0 && <0.1 , unordered-containers >=0.2 && <0.3 , hashable >=1.1 && <1.3 , time >=1.4 && <1.6 , process >=1.2 && <1.3 , unix-compat >=0.4 && <0.5 , http-date >=0.0 && <0.1 if flag(wai3) build-depends: wai >=3.0 && <3.1 , wai-extra >=3.0 && <3.1 cpp-options: -DWAI3 else build-depends: wai >=2.1 && <2.2 , wai-extra >=2.1 && <2.2 , conduit >=1.1 && <1.2 hs-source-dirs: src ghc-options: -O2 -Wall ghc-prof-options: -O2 -Wall -auto-all default-language: Haskell2010 test-suite test-framework main-is: main.hs other-modules: Application , Method type: exitcode-stdio-1.0 build-depends: base >=4.6 && <4.8 , mtl >=2.1 && <2.3 , test-framework >=0.8 && <0.9 , test-framework-hunit >=0.3 && <0.4 , apiary , bytestring >=0.10 && <0.11 , http-types >=0.8 && <0.9 , HUnit >=1.2 && <1.3 if flag(wai3) build-depends: wai >=3.0 && <3.1 , wai-extra >=3.0 && <3.1 else build-depends: wai >=2.1 && <2.2 , wai-test >=2.0 && <2.1 hs-source-dirs: test ghc-options: -O2 -Wall -fno-warn-missing-signatures default-language: Haskell2010 source-repository head type: git location: git://github.com/philopon/apiary.git