aboutsummaryrefslogtreecommitdiff
path: root/src/api/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs
new file mode 100644
index 0000000..edbc427
--- /dev/null
+++ b/src/api/mod.rs
@@ -0,0 +1,14 @@
+// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
+// SPDX-License-Identifier: GPL-3.0-only
+
+mod routes;
+
+pub struct API;
+impl API {
+ pub fn listen() {
+ let _ = rocket::ignite()
+ .mount("/", routes![routes::index])
+ .mount("/api/v1", routes![routes::stats::statistics])
+ .launch();
+ }
+}