embedded-sample.hs 310 B

123456789101112
  1. {-# LANGUAGE TemplateHaskell #-}
  2. import Network.Wai.Application.Static
  3. import Network.Wai.Handler.Warp (run)
  4. import Data.FileEmbed
  5. main :: IO ()
  6. main = run 3000 $ staticApp defaultStaticSettings
  7. { ssFolder = embeddedLookup $ toEmbedded $(embedDir ".")
  8. , ssIndices = []
  9. , ssMaxAge = NoMaxAge
  10. }