main :: IO ()
main = do
  (path:mimeType:_) <- getArgs
  run 3000 (app path $ encodeUtf8 mimeType)

app :: Text -> ByteString -> Application
app path mimeType _req sendResponse = do
  appianReq <- return . eitherDecode . fromStrict =<< requestBody _req :: IO (Either String AppianPage)
  putStrLn $ "The request is: " <> tshow appianReq
  print $ requestMethod _req

  ctnt <- readFile $ unpack path
  sendResponse $ responseLBS