package quickterface
Source file web_app_intf.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23open! Core open! Js_of_ocaml module Web_app_io = struct include Quickterface_web_app_backend.App module Http_client = Cohttp_lwt_jsoo.Client end module type S = sig val run : unit -> unit Lwt.t end module Make (App : Quickterface.App.S) : S = struct module App = App (Web_app_io) let run () = let%lwt io = Web_app_io.make () in try%lwt App.main ~io () with exn -> Web_app_io.console_log_error (sprintf "Fatal application error:\n%s" (Exn.to_string exn)) () end