fix
This commit is contained in:
parent
bff747b4ca
commit
048f77098b
5 changed files with 24 additions and 21 deletions
16
src/app.ml
16
src/app.ml
|
|
@ -42,14 +42,6 @@ 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
|
||||
|
|
@ -66,6 +58,14 @@ let port =
|
|||
|
||||
let () = Dream.log "port: %d" port
|
||||
|
||||
let hostname =
|
||||
match Scfg.Query.get_dir "hostname" config with
|
||||
| None -> Format.sprintf "localhost:%d" port
|
||||
| Some hostname ->
|
||||
Result.fold ~error:failwith ~ok:Fun.id (Scfg.Query.get_param 0 hostname)
|
||||
|
||||
let () = Dream.log "hostname: %s" hostname
|
||||
|
||||
let log =
|
||||
match Scfg.Query.get_dir "log" config with
|
||||
| None -> true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue