summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-10 16:04:55 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-10 16:04:55 +0100
commitd66155968fa02b85eb751c68f20d3a6bb708b5e6 (patch)
treee3c6025cc93c55aee9e3cdb8e1177f16c64b4803
parent1075096df7268111b2de83f0c52af15921be4ca4 (diff)
downloadhakyll-d66155968fa02b85eb751c68f20d3a6bb708b5e6.tar.gz
Move preview server, update to snap 0.4
-rw-r--r--src/Hakyll/Main.hs2
-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
--