Haskell equivalent for python -m http.server?
Asked Answered
S

2

10

Is there a way to start a http server to serve static files right from shell using ghc -e or runhaskell ?

Simper answered 17/10, 2014 at 8:35 Comment(0)
R
15

The wai-app-static package ships with an executable named warp. This can be run from the command line to get a static file server. You can look at its implementation to see how you can reimplement that behavior from runhaskell.

Repeal answered 17/10, 2014 at 9:38 Comment(0)
R
0

https://hackage.haskell.org/package/hserv is also an option, this also uses wai-app-static.

cabal install hserve and run hserv.

Rawhide answered 10/6, 2018 at 18:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.