14 lines
434 B
OCaml
14 lines
434 B
OCaml
|
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>");
|
||
|
]
|