servant/servant-examples/tutorial/T6.hs

19 lines
347 B
Haskell
Raw Normal View History

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
2015-05-06 15:57:22 +02:00
{-# LANGUAGE TypeOperators #-}
2015-05-10 13:39:18 +02:00
module T6 where
2015-05-06 15:57:22 +02:00
import Network.Wai
import Servant
2015-05-06 15:57:22 +02:00
2015-07-30 18:44:13 +02:00
type API = "code" :> Raw IO Application
2015-05-06 15:57:22 +02:00
api :: Proxy API
api = Proxy
server :: Server API
2015-05-10 13:39:18 +02:00
server = serveDirectory "tutorial"
2015-05-06 15:57:22 +02:00
app :: Application
2016-01-14 23:43:48 +01:00
app = serve api EmptyConfig server