mentorenwahl/auth/src/main.rs

22 lines
503 B
Rust

#[cfg(not(target_env = "msvc"))]
use tikv_jemallocator::Jemalloc;
#[cfg(not(target_env = "msvc"))]
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
use actix_web::{middleware, App, HttpServer};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.wrap(middleware::Logger::default())
.service(auth::users::get_users)
.service(auth::pdf::post_pdf)
})
.bind(("0.0.0.0", 80))?
.run()
.await
}