add hello page on /

This commit is contained in:
Swrup 2025-09-28 20:04:52 +02:00
parent d16c8efbf6
commit b9906af27f

View file

@ -75,12 +75,18 @@ module Static = struct
let privacy = static Assets.Privacy let privacy = static Assets.Privacy
end end
let hello req _server _env =
let open Vif.Response.Syntax in
let* () = Vif.Response.with_string req "Hello~~\n" in
let* () = Vif.Response.add ~field:"content-type" "text/plain" in
Vif.Response.respond `OK
let routes = let routes =
let open Vif.Uri in let open Vif.Uri in
let open Vif.Route in let open Vif.Route in
(*let open Vif.Type in*) (*let open Vif.Type in*)
[ [
get (rel / "terms" /?? nil) --> Static.terms get (rel /?? nil) --> hello; get (rel / "terms" /?? nil) --> Static.terms
; get (rel / "privacy" /?? nil) --> Static.privacy ; get (rel / "privacy" /?? nil) --> Static.privacy
] ]