No title

Anonymous Coward 2018-04-26 22:09:57.912894 UTC

1#!/usr/bin/env stack
2-- stack script --resolver lts-10.10 --package warp --package wai --package http-types
3{-# LANGUAGE OverloadedStrings #-}
4import Network.Wai
5import Network.Wai.Handler.Warp
6import Network.HTTP.Types
7import System.Exit
8import Control.Concurrent
9import Control.Monad
10
11main = run 3000 $ \req resp -> do
12 forever $ do
13 putStrLn "Ping"
14 threadDelay 1000000
15 resp $ responseLBS status200 [] "Help"