diff options
-rw-r--r-- | src/Hakyll/Main.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Web/Preview/Server.hs (renamed from src/Hakyll/Network/Server.hs) | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Hakyll/Main.hs b/src/Hakyll/Main.hs index 36a4010..1d60e47 100644 --- a/src/Hakyll/Main.hs +++ b/src/Hakyll/Main.hs @@ -12,7 +12,7 @@ import System.Directory (doesDirectoryExist, removeDirectoryRecursive) import Hakyll.Core.Configuration import Hakyll.Core.Run import Hakyll.Core.Rules -import Hakyll.Network.Server +import Hakyll.Web.Preview.Server -- | This usualy is the function with which the user runs the hakyll compiler -- diff --git a/src/Hakyll/Network/Server.hs b/src/Hakyll/Web/Preview/Server.hs index 0e25959..77b3cb0 100644 --- a/src/Hakyll/Network/Server.hs +++ b/src/Hakyll/Web/Preview/Server.hs @@ -1,7 +1,7 @@ -- | Implements a basic static file server for previewing options -- {-# LANGUAGE OverloadedStrings #-} -module Hakyll.Network.Server +module Hakyll.Web.Preview.Server ( staticServer ) where @@ -12,7 +12,7 @@ import System.FilePath ((</>)) import System.Directory (doesFileExist) import qualified Data.ByteString as SB -import Snap.Util.FileServe (fileServeSingle) +import Snap.Util.FileServe (serveFile) import Snap.Types (Snap, rqURI, getRequest, writeBS) import Snap.Http.Server ( httpServe, setAccessLog, setErrorLog, addListen , ConfigListen (..), emptyConfig @@ -54,7 +54,7 @@ static directory preServe = do -- Found, serve Just f -> do liftIO $ preServe f - fileServeSingle f + serveFile f -- | Main method, runs a static server in the given directory -- |