Add debug switch and API endpoint to stop server when in debug mode.
This commit is contained in:
@ -34,6 +34,7 @@ type
|
||||
StrawBossConfig* = object
|
||||
artifactsRepo*: string
|
||||
authSecret*: string
|
||||
debug*: bool
|
||||
projects*: seq[ProjectDef]
|
||||
pwdCost*: int8
|
||||
users*: seq[UserRef]
|
||||
@ -98,6 +99,7 @@ proc loadStrawBossConfig*(cfgFile: string): StrawBossConfig =
|
||||
result = StrawBossConfig(
|
||||
artifactsRepo: jsonCfg.getIfExists("artifactsRepo").getStr("artifacts"),
|
||||
authSecret: jsonCfg.getOrFail("authSecret", "strawboss config").getStr,
|
||||
debug: jsonCfg.getIfExists("debug").getBVal(false),
|
||||
pwdCost: int8(jsonCfg.getOrFail("pwdCost", "strawboss config").getNum),
|
||||
projects: projectDefs,
|
||||
users: users)
|
||||
|
Reference in New Issue
Block a user