Add static middleware
This commit is contained in:
parent
b28c20f4e5
commit
2173c47696
|
@ -3,6 +3,7 @@ module Main where
|
|||
|
||||
import qualified Database.SQLite.Simple as Db
|
||||
import qualified Web.Spock.Safe as S hiding (head)
|
||||
import Network.Wai.Middleware.Static
|
||||
import qualified Within.DBMemorial.Post as Post
|
||||
|
||||
main :: IO ()
|
||||
|
@ -15,5 +16,6 @@ main = do
|
|||
|
||||
-- Set up the URL router
|
||||
S.runSpock 5000 $ S.spockT id $ do
|
||||
S.middleware (staticPolicy (addBase "public"))
|
||||
S.get S.root $
|
||||
S.text $ Post.body h
|
||||
|
|
|
@ -62,6 +62,7 @@ executable time-wasting-thread-memorial
|
|||
, sqlite-simple >=0.4.9.0
|
||||
, text >=1.2.1.1
|
||||
, blaze-html >=0.8.0.2
|
||||
, wai-middleware-static >=0.7.0.1
|
||||
|
||||
-- Directories containing source files.
|
||||
hs-source-dirs: src
|
||||
|
|
Loading…
Reference in New Issue