personal_website/src/public/mod.rs

20 lines
364 B
Rust
Raw Normal View History

2024-03-23 19:35:31 +00:00
2024-03-23 20:03:16 +00:00
mod routes;
2024-03-23 19:35:31 +00:00
mod templates;
2024-03-23 20:03:16 +00:00
use actix_web::{web, App, HttpServer};
2024-03-23 19:35:31 +00:00
2024-03-23 20:03:16 +00:00
pub(crate) async fn start_actix() -> anyhow::Result<()> {
log::info!("Serving an http server at https://0.0.0.0:8080");
HttpServer::new(|| {
App::new()
.route("/", web::get().to(routes::index))
})
2024-03-23 19:35:31 +00:00
2024-03-23 20:03:16 +00:00
.bind("0.0.0.0:8080")?
.run()
.await?;
Ok(())
}