Rewrite to rust

This commit is contained in:
2023-08-06 21:27:52 +02:00
parent fd4de89515
commit a7a7dd50a2
32 changed files with 3475 additions and 1920 deletions

29
src/main.rs Normal file
View File

@@ -0,0 +1,29 @@
pub mod views;
pub mod config;
pub mod services;
pub mod structures;
use std::net::SocketAddr;
use tracing::info;
use crate::views::get_router;
#[tokio::main]
async fn main() {
tracing_subscriber::fmt()
.with_target(false)
.compact()
.init();
let addr = SocketAddr::from(([0, 0, 0, 0], 8080));
let app = get_router().await;
info!("Start webserver...");
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
info!("Webserver shutdown...")
}