Created
February 6, 2016 19:22
-
-
Save tazjin/97b957a7f88d52079406 to your computer and use it in GitHub Desktop.
servant-echo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
module Main where | |
import Data.Proxy | |
import Data.Text (Text, empty) | |
import Network.Wai.Handler.Warp (run) | |
import Servant | |
import Servant.Server | |
type Echo = Get '[PlainText] Text | |
handler :: Server Echo | |
handler = return empty | |
main :: IO () | |
main = run 8080 $ serve (Proxy :: Proxy Echo) handler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment