Rewrite to rust

This commit is contained in:
2023-07-24 21:54:32 +02:00
parent a7e8b74dd0
commit 9f70226a15
39 changed files with 11984 additions and 1925 deletions

33
src/main.rs Normal file
View File

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