Skip to content

Commit

Permalink
Create a value for usersServer with typed holes
Browse files Browse the repository at this point in the history
  • Loading branch information
bradparker committed Oct 2, 2019
1 parent 250be8d commit 12aa753
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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.