oasis-server/bin/main.ml

14 lines
434 B
OCaml
Raw Permalink Normal View History

2023-08-13 22:44:10 -06:00
let () =
print_endline "Hello, World!";
Dream.run @@ Dream.logger
@@ Dream.router
[
Dream.get "/static/**" @@ Dream.static "static";
Oasis_server.Utils.html_page_route "/";
Dream.get "/echo/:message" (fun request ->
Dream.html (Dream.param request "message"));
Dream.get "/test" (fun _ ->
Unix.sleep 1;
Dream.html "<p>You got me!</p>");
]