Implements ability to specify the HTTP port.
This commit is contained in:
parent
b9df0ec895
commit
b8c1ae1fe0
2 changed files with 5 additions and 0 deletions
|
|
@ -750,6 +750,9 @@ include "main.tmpl"
|
|||
|
||||
initialise()
|
||||
|
||||
settings:
|
||||
port = config.port.Port
|
||||
|
||||
routes:
|
||||
|
||||
get "/threads.json":
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ type
|
|||
hostname*: string
|
||||
name*, title*: string
|
||||
ga*: string
|
||||
port*: int
|
||||
|
||||
ForumError* = object of Exception
|
||||
data*: PostError
|
||||
|
|
@ -66,6 +67,7 @@ proc loadConfig*(filename = getCurrentDir() / "forum.json"): Config =
|
|||
result.name = root["name"].getStr()
|
||||
result.title = root["title"].getStr()
|
||||
result.ga = root{"ga"}.getStr()
|
||||
result.port = root{"port"}.getNum(5000).int
|
||||
|
||||
proc processGT(n: XmlNode, tag: string): (int, XmlNode, string) =
|
||||
result = (0, newElement(tag), tag)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue