From 0e36cd0e06fd8991370b5f2eb08e35b9e1d58ddb Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Sun, 10 Jul 2011 08:42:09 -0700 Subject: [PATCH] more documentation --- scaffold/Settings_hs.cg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scaffold/Settings_hs.cg b/scaffold/Settings_hs.cg index e5624603..ba44a3aa 100644 --- a/scaffold/Settings_hs.cg +++ b/scaffold/Settings_hs.cg @@ -43,8 +43,13 @@ data AppEnvironment = Test | Production deriving (Eq, Show, Read, Enum, Bounded) --- | dynamic per-environment configuration loaded from a YAML file --- use this to avoid the need to re-compile between staging and production environments +-- | Dynamic per-environment configuration loaded from the YAML file Settings.yaml. +-- Use dynamic settings to avoid the need to re-compile the application (between staging and production environments). +-- +-- By convention these settings should be overwritten by any command line arguments. +-- See config/~sitearg~.hs for command line arguments +-- Command line arguments provide some convenience but are also required for hosting situations where a setting is read from the environment (appPort on Heroku). +-- data AppConfig = AppConfig { appEnv :: AppEnvironment @@ -72,7 +77,7 @@ data AppConfig = AppConfig { -- you would probably want it to be: -- > "http://yesod.com" , appRoot :: Text -} +} deriving (Show) loadConfig :: AppEnvironment -> IO AppConfig loadConfig env = do