This commit is contained in:
parent
24c7ec2b17
commit
dad0657878
7 changed files with 35 additions and 20 deletions
|
|
@ -76,8 +76,6 @@ module Make
|
|||
with type stack = STACK.t
|
||||
and type flow = STACK.TCP.flow) =
|
||||
struct
|
||||
module Pgx_mirage = Pgx_lwt_mirage.Make (STACK) (Happy_eyeballs)
|
||||
|
||||
let map_err_to_string pp_err res =
|
||||
Lwt.map (R.reword_error (R.msgf "%a" pp_err)) res
|
||||
|
||||
|
|
@ -276,11 +274,18 @@ struct
|
|||
let (`Initialized th) = Paf.serve http_1_1_service http_server in
|
||||
th
|
||||
|
||||
(*module Pgx_mirage = Pgx_lwt_mirage.Make (STACK) (Happy_eyeballs)*)
|
||||
|
||||
module Dns = Dns_client_mirage.Make (STACK) (Happy_eyeballs)
|
||||
module Caqti_mirage_connect = Caqti_mirage.Make (STACK) (Dns)
|
||||
|
||||
|
||||
let start assets_ro certificate_ro key_ro tcpv4v6 http_server stack
|
||||
happy_eyeballs pgx_setup =
|
||||
happy_eyeballs _pgx_setup =
|
||||
Logs.set_reporter (Logs_fmt.reporter ());
|
||||
Logs.(set_level (Some Info));
|
||||
let open Lwt.Syntax in
|
||||
(*
|
||||
let pgx = Pgx_mirage.connect (stack, happy_eyeballs) in
|
||||
let module Pgx = (val pgx : Pgx_lwt.S) in
|
||||
let { pgx_database; pgx_port; pgx_hostname; pgx_user; pgx_password } =
|
||||
|
|
@ -295,6 +300,7 @@ struct
|
|||
| false -> Fmt.failwith "Pgx connection failure: connection not alive"
|
||||
| true -> Logs.info (fun m -> m "Pgx connection success")
|
||||
in
|
||||
*)
|
||||
let* assets_res = Assets.assets assets_ro in
|
||||
match assets_res with
|
||||
| Error (`Msg m) -> Fmt.failwith "Assets configuration error: %s." m
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue