This commit is contained in:
Swrup 2025-09-13 15:56:19 +02:00
commit e872f52e97
8 changed files with 116 additions and 0 deletions

11
src/assets/privacy.html Normal file
View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MTE privacy policy</title>
</head>
<body>
<h1>MTE privacy policy</h1>
TODO
</body>
</html>

11
src/assets/terms.html Normal file
View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MTE terms</title>
</head>
<body>
<h1>MTE terms</h1>
TODO
</body>
</html>

4
src/dune Normal file
View file

@ -0,0 +1,4 @@
(executable
(public_name mte)
(name mte)
(libraries vif fmt jsont))

18
src/mte.ml Normal file
View file

@ -0,0 +1,18 @@
let terms req _server _ =
Vif.Response.with_file ~compression:`DEFLATE req
Fpath.(v "assets" / "terms.html")
let privacy req _server _ =
Vif.Response.with_file ~compression:`DEFLATE req
Fpath.(v "assets" / "privacy.html")
let routes =
let open Vif.Uri in
let open Vif.Route in
(*let open Vif.Type in*)
[
get (rel / "terms" /?? nil) --> terms
; get (rel / "privacy" /?? nil) --> privacy
]
let () = Miou_unix.run @@ fun () -> Vif.run routes ()