This commit is contained in:
parent
67a2282141
commit
d1162c329f
2 changed files with 7 additions and 5 deletions
|
|
@ -1,11 +1,13 @@
|
||||||
open Parse_config
|
open Parse_config
|
||||||
|
|
||||||
let config_data =
|
let config_data =
|
||||||
let read_file file = In_channel.with_open_bin file In_channel.input_all in
|
let path = Fpath.to_string (Fpath.v "default.config") in
|
||||||
let content = read_file "default.config" in
|
match Assets_crunch.read path with
|
||||||
let v = Parse_data.parse content in
|
| None -> Fmt.failwith "static file not found: `%s`" path
|
||||||
(*Fmt.epr "config file:@\n%a@." Pp_debug.pp_config v;*)
|
| Some data ->
|
||||||
v
|
let v = Parse_data.parse data in
|
||||||
|
(*Fmt.epr "config file:@\n%a@." Pp_debug.pp_config v;*)
|
||||||
|
v
|
||||||
|
|
||||||
module Exchange = struct
|
module Exchange = struct
|
||||||
let get_opt field = get_opt config_data ~section:"exchange" ~field
|
let get_opt field = get_opt config_data ~section:"exchange" ~field
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue