Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell equivalent for python -m http.server?

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

like image 219
Shanthakumar Avatar asked Oct 17 '14 08:10

Shanthakumar


1 Answers

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.

like image 71
Michael Snoyman Avatar answered Nov 16 '22 02:11

Michael Snoyman