add hello page on /
This commit is contained in:
parent
d16c8efbf6
commit
b9906af27f
1 changed files with 7 additions and 1 deletions
|
|
@ -75,12 +75,18 @@ module Static = struct
|
|||
let privacy = static Assets.Privacy
|
||||
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 open Vif.Uri in
|
||||
let open Vif.Route 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
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue