Yuji Yamamoto
2015-05-24
This slide was planned to be used for the Lightning Talk of
LambdaConf 2015.
But I missed the chance.😞
[capture|/api/hello/|] $ do
method GET . document "get hello" . action $ do
contentType "application/json"
bytes "{\"hello\":\"world\"}"
method POST .
([key|name|] =: pMaybe pString) .
document "say hello to +name+" .
accept "text/plain" .
action $ d
n <- param [key|name|]
bytes "Hello, " <> n
Compared to Scotty:
Compared to Spock:
Compared to Servant:
Less typing keyboard thanks to QQ-based declaration:
Doesn’t need type declaration.
Doesn’t need to separate
cabal install apiary
Space, Right Arrow or swipe left to move to next slide, click help below for more details