treewide: Migrate to clean-architecture
Signed-off-by: supercmmetry <vishaals2000@gmail.com>
This commit is contained in:
13 files changed
+42
-7
No files matched your search
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,5 @@
|
||||
pub mod routes;
|
||||
pub mod catchers;
|
||||
|
||||
mod guards;
|
||||
mod misc;
|
||||
@@ -0,0 +1,11 @@
|
||||
use rocket::Rocket;
|
||||
|
||||
#[get("/check")]
|
||||
fn check() -> &'static str {
|
||||
"OK"
|
||||
}
|
||||
|
||||
|
||||
pub fn fuel(rocket: Rocket) -> Rocket {
|
||||
rocket.mount("/api/health", routes![check])
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
use rocket::Rocket;
|
||||
|
||||
pub mod health;
|
||||
|
||||
pub fn fuel(rocket: Rocket) -> Rocket {
|
||||
let mut rocket = rocket;
|
||||
|
||||
rocket = health::fuel(rocket);
|
||||
|
||||
rocket
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pub mod paste;
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,4 @@
|
||||
pub mod entity;
|
||||
pub mod repository;
|
||||
pub mod diesel;
|
||||
pub mod service;
|
||||
Whitespace-only changes.
Whitespace-only changes.
+9
-7
@@ -3,13 +3,15 @@
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
|
||||
#[get("/alive")]
|
||||
fn alive() -> &'static str {
|
||||
"OK"
|
||||
}
|
||||
pub mod api;
|
||||
pub mod core;
|
||||
|
||||
|
||||
|
||||
fn main() {
|
||||
rocket::ignite()
|
||||
.mount("/", routes![index])
|
||||
.launch();
|
||||
let mut rocket = rocket::ignite();
|
||||
|
||||
rocket = api::routes::fuel(rocket);
|
||||
|
||||
rocket.launch();
|
||||
}
|
||||
Reference in new issue
Block a user