summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core
diff options
context:
space:
mode:
authorchrisdotcode <chris@code.sc>2014-03-24 04:33:24 -0400
committerchrisdotcode <chris@code.sc>2014-03-24 04:50:17 -0400
commit5af08f807e9022ac75625daf254a648b7e09b545 (patch)
tree7f4d7a0b8cac1e3045f4ab009f3c3165f7e38fc3 /src/Hakyll/Core
parent1a63b931a0f0e6049e9457635af8fbd0e38dfbea (diff)
downloadhakyll-5af08f807e9022ac75625daf254a648b7e09b545.tar.gz
Add flag to bind on selected host.
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r--src/Hakyll/Core/Configuration.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Hakyll/Core/Configuration.hs b/src/Hakyll/Core/Configuration.hs
index f9927de..52b23ec 100644
--- a/src/Hakyll/Core/Configuration.hs
+++ b/src/Hakyll/Core/Configuration.hs
@@ -69,6 +69,11 @@ data Configuration = Configuration
, -- | Use an in-memory cache for items. This is faster but uses more
-- memory.
inMemoryCache :: Bool
+ , -- | Override default host for preview server. Default is "127.0.0.1",
+ -- which binds only on the loopback address.
+ -- One can also override the host as a command line argument:
+ -- ./site preview -h "0.0.0.0"
+ previewHost :: String
, -- | Override default port for preview server. Default is 8000.
-- One can also override the port as a command line argument:
-- ./site preview -p 1234
@@ -91,6 +96,7 @@ defaultConfiguration = Configuration
, deployCommand = "echo 'No deploy command specified' && exit 1"
, deploySite = system . deployCommand
, inMemoryCache = True
+ , previewHost = "127.0.0.1"
, previewPort = 8000
}
where