22 lines
432 B
Rust
22 lines
432 B
Rust
use std::sync::Arc;
|
|
|
|
use chrono::Utc;
|
|
use dao::main_dao;
|
|
|
|
pub mod dao;
|
|
pub mod routes;
|
|
pub mod services;
|
|
pub mod utils;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let start_time = Utc::now().timestamp_millis();
|
|
|
|
let db_conn = Arc::new(main_dao::connect_to_database().await.unwrap());
|
|
|
|
// Pass shared state to server and start it
|
|
routes::main_router::start_all_routes(start_time, db_conn)
|
|
.await
|
|
.unwrap();
|
|
}
|