init
This commit is contained in:
commit
e872f52e97
8 changed files with 116 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
_build
|
||||
13
.ocamlformat
Normal file
13
.ocamlformat
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
version=0.27.0
|
||||
exp-grouping=preserve
|
||||
break-infix=wrap-or-vertical
|
||||
break-collection-expressions=wrap
|
||||
break-sequences=false
|
||||
break-infix-before-func=false
|
||||
dock-collection-brackets=true
|
||||
break-separators=before
|
||||
field-space=tight
|
||||
if-then-else=compact
|
||||
break-sequences=false
|
||||
sequence-blank-line=compact
|
||||
exp-grouping=preserve
|
||||
26
dune-project
Normal file
26
dune-project
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
(lang dune 3.20)
|
||||
|
||||
(name mte)
|
||||
|
||||
(generate_opam_files true)
|
||||
|
||||
(source
|
||||
(github username/reponame))
|
||||
|
||||
(authors "Author Name <author@example.com>")
|
||||
|
||||
(maintainers "Maintainer Name <maintainer@example.com>")
|
||||
|
||||
(license LICENSE)
|
||||
|
||||
(documentation https://url/to/documentation)
|
||||
|
||||
(package
|
||||
(name mte)
|
||||
(synopsis "A short synopsis")
|
||||
(description "A longer description")
|
||||
(depends ocaml)
|
||||
(tags
|
||||
("add topics" "to describe" your project)))
|
||||
|
||||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html
|
||||
32
mte.opam
Normal file
32
mte.opam
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
synopsis: "A short synopsis"
|
||||
description: "A longer description"
|
||||
maintainer: ["Maintainer Name <maintainer@example.com>"]
|
||||
authors: ["Author Name <author@example.com>"]
|
||||
license: "LICENSE"
|
||||
tags: ["add topics" "to describe" "your" "project"]
|
||||
homepage: "https://github.com/username/reponame"
|
||||
doc: "https://url/to/documentation"
|
||||
bug-reports: "https://github.com/username/reponame/issues"
|
||||
depends: [
|
||||
"dune" {>= "3.20"}
|
||||
"ocaml"
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
["dune" "subst"] {dev}
|
||||
[
|
||||
"dune"
|
||||
"build"
|
||||
"-p"
|
||||
name
|
||||
"-j"
|
||||
jobs
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
]
|
||||
dev-repo: "git+https://github.com/username/reponame.git"
|
||||
x-maintenance-intent: ["(latest)"]
|
||||
11
src/assets/privacy.html
Normal file
11
src/assets/privacy.html
Normal 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
11
src/assets/terms.html
Normal 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
4
src/dune
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(executable
|
||||
(public_name mte)
|
||||
(name mte)
|
||||
(libraries vif fmt jsont))
|
||||
18
src/mte.ml
Normal file
18
src/mte.ml
Normal 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 ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue