summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/dune2
-rw-r--r--bin/main.ml7
2 files changed, 5 insertions, 4 deletions
diff --git a/bin/dune b/bin/dune
index 64f988c..864d145 100644
--- a/bin/dune
+++ b/bin/dune
@@ -1,4 +1,4 @@
(executable
(public_name ogit)
(name main)
- (libraries dream handlers))
+ (libraries ogit dream))
diff --git a/bin/main.ml b/bin/main.ml
index 7a4341f..895bfb8 100644
--- a/bin/main.ml
+++ b/bin/main.ml
@@ -2,7 +2,8 @@ let () =
Dream.run @@ Dream.logger
@@ Dream.router
[
- Dream.get "/" @@ Handlers.ogit_root;
- Dream.get "/:repo_name/" @@ Handlers.repo_root repo;
- (* Dream.get "/:repo_name/tree" Handlers.repo_tree; *)
+ Dream.get "/" (fun _ -> Ogit.Handlers.ogit_root ());
+ Dream.get "/:repo_name" (fun request ->
+ Ogit.Handlers.repo_root @@ Dream.param request "repo_name");
+ Dream.get "/static/**" (Dream.static "./lib/static");
]
Copyright 2019--2025 Marius PETER