Haskell 等效于 python -m http.server?

标签 haskell httpserver simplehttpserver haskell-warp

有没有办法使用 ghc -e 或 runhaskell 直接从 shell 启动 http 服务器来提供静态文件?

最佳答案

wai-app-static软件包附带一个名为 warp 的可执行文件.这可以从命令行运行以获取静态文件服务器。您可以look at its implementation查看如何从 runhaskell 重新实现该行为.

关于Haskell 等效于 python -m http.server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26421049/

相关文章:

haskell - 如何为流媒体包实现 Pipes-Group 中的 Folds 和 FoldsM?

haskell - 在 Haskell 中自定义列表中的元素相乘

haskell - : IO String-> String 类型的 Haskell 函数

google-chrome - 加载我的索引 html 文件与使用 http-server 有什么区别?

python - 使用 BaseHTTPRequestHandler 从 POST 请求接收二进制文件

haskell - 转换为 Pointfree 风格?

go - 为什么这个 go HTTP 服务器在 Chrome 47 中不为每个请求生成一个 goroutine?

python - 保存日志 - SimpleHTTPServer

python - 在 tmux session 中出现 LSOpenURLsWithRole() 错误

java - Netty 4 HttpChunkedInput 在 HttpObjectEncoder 中抛出 "unexpected message type: DefaultHttpContent"