#!/usr/bin/env stack -- stack --resolver lts-11.10 script --optimize {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} import Conduit import Data.Aeson (fromEncoding, toEncoding) import Data.Aeson.Parser (json') import Data.Conduit.Attoparsec (sinkParser) import Network.HTTP.Types import Network.Wai import Network.Wai.Conduit import Network.Wai.Handler.Warp import RIO main :: IO () main = run 3000 $ \req respond -> do void $ runConduit $ sourceRequestBody req .| sinkParser json' respond $ responseBuilder status200 [] "Complete\n"