0
나는Wai/Warp에서 images/css/js 폴더를 서버하는 방법은 무엇입니까? 모든 이미지는 내가 "로 된 index.html에서 모든 이미지를 참조 할 수 있습니다 있도록
app :: Wai.Application
app req respond = respond $ case Wai.rawPathInfo req of
"/" -> Wai.responseFile status200 [("Content-Type", "text/html")] "views/index.html" Nothing
_ -> notFound
notFound :: Wai.Response
notFound = Wai.responseLBS status404 [("Content-Type", "text/plain")] "404 - Not Found"
main :: IO()
main = do
port <- getEnv "PORT"
let setting = Warp.setPort (read port :: Int) Warp.defaultSettings
putStrLn $ "start server on the port " ++ port
Warp.runSettings setting app
가 어떻게 경로에 폴더"이미지 "를 추가 할 수 있습니다 간단한 와이/워프 응용 프로그램이 images/something.jpg "? 정확하게 경로를 추가하는 방법을 알고 있지만 전체 폴더를 추가해야합니다.