Files
hottub/src/main.rs
2025-05-31 13:54:27 +00:00

28 lines
647 B
Rust

use ntex_files as fs;
use ntex::web;
mod api;
mod status;
mod videos;
mod providers;
mod util;
#[ntex::main]
async fn main() -> std::io::Result<()> {
std::env::set_var("RUST_LOG", "ntex=info");
std::env::set_var("RUST_BACKTRACE", "1");
env_logger::init(); // You need this to actually see logs
web::HttpServer::new(|| {
web::App::new()
.wrap(web::middleware::Logger::default())
.service(web::scope("/api").configure(api::config))
.service(fs::Files::new("/", "static"))
})
// .bind_openssl(("0.0.0.0", 18080), builder)?
.bind(("0.0.0.0", 18080))?
.run()
.await
}