@@ -1,15 +1,12 @@
1# servant-jquery
1# servant-jquery
3−[](http://travis-ci.org/haskell-servant/servant-jquery)
4−[](https://coveralls.io/r/haskell-servant/servant-jquery)
6
3
8This library lets you derive automatically (JQuery based) Javascript functions that let you query each endpoint of a *servant* webservice.
5This library lets you derive automatically (JQuery based) Javascript functions that let you query each endpoint of a *servant* webservice.
12−Read more about the following example [here](https://github.com/haskell-servant/servant-jquery/tree/master/examples#examples).
9+Read more about the following example [here](https://github.com/haskell-servant/servant/tree/master/servant-jquery/tree/master/examples#examples).
14``` haskell
11``` haskell
15{-# LANGUAGE DataKinds #-}
12{-# LANGUAGE DataKinds #-}
@@ -53,7 +50,7 @@ currentValue counter = liftIO $ readTVarIO counter
53-- * Our API type
50-- * Our API type
54type TestApi = "counter" :> Post Counter -- endpoint for increasing the counter
51type TestApi = "counter" :> Post Counter -- endpoint for increasing the counter
55 :<|> "counter" :> Get Counter -- endpoint to get the current value
52 :<|> "counter" :> Get Counter -- endpoint to get the current value
56− :<|> Raw -- used for serving static files
53+ :<|> Raw -- used for serving static files
58testApi :: Proxy TestApi
55testApi :: Proxy TestApi
59testApi = Proxy
56testApi = Proxy
@@ -94,4 +91,4 @@ main = do
95 -- listen to requests on port 8080
92 -- listen to requests on port 8080
96 runServer cnt 8080
93 runServer cnt 8080