Skip to content

Instantly share code, notes, and snippets.

@tazjin
Created February 6, 2016 19:22
Show Gist options
  • Save tazjin/97b957a7f88d52079406 to your computer and use it in GitHub Desktop.
Save tazjin/97b957a7f88d52079406 to your computer and use it in GitHub Desktop.
servant-echo
{-# 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