summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Configuration.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2014-03-25 11:11:30 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2014-03-25 11:11:30 +0100
commit81a970c2930ad90308fb690c2bb71c7ef8ca6167 (patch)
treeb46659f47c649deb3a3b72d57a539771eb0eaf67 /src/Hakyll/Core/Configuration.hs
parent677a7f0f2d6e2daeb57f7897b1f77b0993243839 (diff)
parentc922ab57acb6cdfab53bf0977c8731e737de06f8 (diff)
downloadhakyll-81a970c2930ad90308fb690c2bb71c7ef8ca6167.tar.gz
Merge pull request #234 from chrisdotcode/master
Add flag to bind on selected host, instead of default "0.0.0.0"
Diffstat (limited to 'src/Hakyll/Core/Configuration.hs')
-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