on master help sign in
Move preview server, update to snap 0.4
commitd66155968fa02b85eb751c68f20d3a6bb708b5e6 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateThu 10 Feb 2011, 16:04 (16 years ago) parent1075096
2 files changed+4−4
src/Hakyll/Main.hs+1−1 src/Hakyll/Network/Server.hs → src/Hakyll/Web/Preview/Server.hs+3−3
src/Hakyll/Main.hs+1−1
@@ -12,7 +12,7 @@ import System.Directory (doesDirectoryExist, removeDirectoryRecursive)
1212import Hakyll.Core.Configuration
1313import Hakyll.Core.Run
1414import Hakyll.Core.Rules
15−import Hakyll.Network.Server
15+import Hakyll.Web.Preview.Server
1616
1717-- | This usualy is the function with which the user runs the hakyll compiler
1818--
src/Hakyll/Network/Server.hs → src/Hakyll/Web/Preview/Server.hsrenamed+3−3
@@ -1,7 +1,7 @@
11-- | Implements a basic static file server for previewing options
22--
33{-# LANGUAGE OverloadedStrings #-}
4−module Hakyll.Network.Server
4+module Hakyll.Web.Preview.Server
55 ( staticServer
66 ) where
77
@@ -12,7 +12,7 @@ import System.FilePath ((</>))
1212import System.Directory (doesFileExist)
1313
1414import qualified Data.ByteString as SB
15−import Snap.Util.FileServe (fileServeSingle)
15+import Snap.Util.FileServe (serveFile)
1616import Snap.Types (Snap, rqURI, getRequest, writeBS)
1717import Snap.Http.Server ( httpServe, setAccessLog, setErrorLog, addListen
1818 , ConfigListen (..), emptyConfig
@@ -54,7 +54,7 @@ static directory preServe = do
5454 -- Found, serve
5555 Just f -> do
5656 liftIO $ preServe f
57− fileServeSingle f
57+ serveFile f
5858
5959-- | Main method, runs a static server in the given directory
6060--