Haskell
wai
warp

Haskell版フォルダを指定してhttpで公開する簡易Webサーバー

More than 1 year has passed since last update.
server.hs
module Main where

import Network.Wai.Application.Static
import Network.Wai.Handler.Warp

port = 3001
dir = "/path/to/public"

main = run port $ staticApp $ defaultFileServerSettings dir

実行方法

$ stack install wai-app-static warp # Install dependencies
$ stack runghc server.hs # Start server