Files
icarus_auth/src/main.rs
phoenix 9b77a8dd78
All checks were successful
Rust Build / Check (pull_request) Successful in 33s
Rust Build / Test Suite (pull_request) Successful in 35s
Rust Build / Rustfmt (pull_request) Successful in 25s
Rust Build / Clippy (pull_request) Successful in 34s
Rust Build / build (pull_request) Successful in 43s
Separated the code
2025-03-31 19:16:15 -04:00

28 lines
678 B
Rust

use axum::{
Router,
routing::{get, post},
};
pub mod callers;
pub mod config;
pub mod models;
#[tokio::main]
async fn main() {
// initialize tracing
tracing_subscriber::fmt::init();
// build our application with a route
let app = Router::new()
.route(callers::endpoints::ROOT, get(callers::common::root))
.route(
callers::endpoints::REGISTER,
post(callers::register::register_user),
);
// run our app with hyper, listening globally on port 3000
let url = config::get_full();
let listener = tokio::net::TcpListener::bind(url).await.unwrap();
axum::serve(listener, app).await.unwrap();
}