Skip to content
Permalink
Browse files

Create a value for `usersServer` with typed holes

  • Loading branch information...
bradparker committed Oct 2, 2019
1 parent 250be8d commit 12aa753d4c3a18809467ff3986c08e0b512c4fcd
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/Main.hs
@@ -13,11 +13,12 @@ import GHC.Generics (Generic)
import Network.Wai (Application)
import Network.Wai.Handler.Warp (run)
import Servant
( (:<|>)
( (:<|>)((:<|>))
, (:>)
, Capture
, Get
, JSON
, Server
, serve
)

@@ -42,8 +43,11 @@ type UsersAPI =
"users"
:> (UsersIndex :<|> UsersShow)

usersServer :: Server UsersAPI
usersServer = _usersIndex :<|> _usersShow

usersApp :: Application
usersApp = serve (Proxy @UsersAPI) _usersServer
usersApp = serve (Proxy @UsersAPI) usersServer

main :: IO ()
main = run 8080 usersApp

0 comments on commit 12aa753

Please sign in to comment.
You can’t perform that action at this time.