add hostname to config
This commit is contained in:
parent
1f54bfe9be
commit
bff747b4ca
2 changed files with 14 additions and 11 deletions
|
|
@ -42,6 +42,14 @@ let open_registration =
|
|||
|
||||
let () = Dream.log "open_registration: %b" open_registration
|
||||
|
||||
let hostname =
|
||||
match Scfg.Query.get_dir "hostname" config with
|
||||
| None -> failwith "no `hostname` in configuration file"
|
||||
| Some hostname ->
|
||||
Result.fold ~error:failwith ~ok:Fun.id (Scfg.Query.get_param 0 hostname)
|
||||
|
||||
let () = Dream.log "hostname: %s" hostname
|
||||
|
||||
let port =
|
||||
match Scfg.Query.get_dir "port" config with
|
||||
| None -> 8080
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue