Skip to content

Instantly share code, notes, and snippets.

@scan
Created September 6, 2012 11:44
Show Gist options
  • Save scan/3655307 to your computer and use it in GitHub Desktop.
Save scan/3655307 to your computer and use it in GitHub Desktop.
main :: IO ()
main = simpleHTTP nullConf $ do
_ <- compressedResponseFilter
msum
[ dir "" $ do
nullDir
ok . toResponse $ object ["status" .= ("ok" :: Text)]
, serveDirectory DisableBrowsing [] "./public/"
, notFound . toResponse $ object ["error" .= ("not found" :: Text)]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment