Closed gtach2o closed 4 years ago
@gtach2o thanks for checking out naboris!
I will definitely update the readme to an actual working example.. that's my fault.
Naboris.listenAndWaitForever
actually returns an Lwt
Promise
(which never resolves)
At the highest level Lwt
promises need to be executed within the context of Lwt_main
. You can read their documentation here https://ocsigen.org/lwt/5.1.1/api/Lwt_main
To get your example up and running wrap the last call like this.
let _ = Lwt_main.run begin
Naboris.listenAndWaitForever 3000 server_config
end
Thank you! It works.
I'm going to leave this open until I actually fix the README
Will be fixed in 0.1.1
Hi! I was trying to execute OCaml example from readme
but I didn't get success.
Here are the steps:
No errors. Execute
nothing happens. I'm beginner in OCaml, so maybe I did something wrong. I would appreciate any advice. Thanks.