This commit is contained in:
parent
e58c15f1c9
commit
70ec7f5e53
@ -49,7 +49,8 @@ let Config =
|
||||
, AppName : Text
|
||||
, LiveMode : Bool
|
||||
, DevelMode : Bool
|
||||
, LoginCookieName : Optional Text
|
||||
, SessionCookieName : Text
|
||||
, SessionCookieSecret : Text
|
||||
}
|
||||
|
||||
let defconf
|
||||
@ -61,7 +62,8 @@ let defconf
|
||||
, AppName = "pcmt"
|
||||
, LiveMode = False
|
||||
, DevelMode = False
|
||||
, LoginCookieName = None Text
|
||||
, SessionCookieName = "sessionz"
|
||||
, SessionCookieSecret = "secret"
|
||||
}
|
||||
|
||||
let conf
|
||||
@ -88,4 +90,4 @@ let _ =
|
||||
-- | validate the configuration.
|
||||
assert : Config/validate conf
|
||||
|
||||
in nuconf
|
||||
in conf
|
||||
|
@ -11,6 +11,8 @@ type Config struct {
|
||||
AppName string
|
||||
LiveMode bool
|
||||
DevelMode bool
|
||||
SessionCookieName string
|
||||
SessionCookieSecret string
|
||||
}
|
||||
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user