Move preview server, update to snap 0.4

This commit is contained in:
Jasper Van der Jeugt 2011-02-10 16:04:55 +01:00
parent 1075096df7
commit d66155968f
2 changed files with 4 additions and 4 deletions

View file

@ -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
--

View file

@ -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
--