From 5af08f807e9022ac75625daf254a648b7e09b545 Mon Sep 17 00:00:00 2001 From: chrisdotcode Date: Mon, 24 Mar 2014 04:33:24 -0400 Subject: Add flag to bind on selected host. --- src/Hakyll/Core/Configuration.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Hakyll/Core') 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 -- cgit v1.2.3