aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-04-26 15:42:39 +0000
committerFuwn <[email protected]>2021-04-26 15:42:39 +0000
commitcc286c6d9fd8527759a9a037b471f2bdd9de6e89 (patch)
tree78545fde636ec248aa039aa2ec1581b9b9055338 /src/main.rs
parentfmt: Change case (diff)
downloadapi-worker-cc286c6d9fd8527759a9a037b471f2bdd9de6e89.tar.xz
api-worker-cc286c6d9fd8527759a9a037b471f2bdd9de6e89.zip
major: :star:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..35af208
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,27 @@
+// Copyleft 2021-2021 The Senpy Club
+// SPDX-License-Identifier: GPL-3.0-only
+
+#![feature(proc_macro_hygiene, decl_macro, type_ascription)]
+
+#[macro_use]
+extern crate rocket;
+
+pub mod constants;
+pub mod routes;
+pub mod structures;
+pub mod utils;
+
+#[launch]
+fn rocket() -> _ {
+ dotenv::dotenv().ok();
+
+ rocket::build().mount("/", routes![routes::index]).mount(
+ "/api/v1",
+ routes![
+ routes::github,
+ routes::languages,
+ routes::language,
+ routes::random
+ ],
+ )
+}