summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-03-15 19:05:21 -0400
committermrw1593 <botahamec@outlook.com>2023-03-15 19:05:21 -0400
commite1793b571eadb06c3da09697d379eccd72b12b73 (patch)
treeed6141d199a596431dc1b3dda6b7a79e440b702f /src/main.rs
parent7136b081097377d5c85b3c64f5e1443e98fc5318 (diff)
Created a basic HttpServer
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index e7a11a9..ec04d93 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,14 @@
-fn main() {
- println!("Hello, world!");
+use std::time::Duration;
+
+use actix_web::{App, HttpServer};
+
+mod api;
+
+#[actix_web::main]
+async fn main() -> std::io::Result<()> {
+ HttpServer::new(|| App::new().service(api::liveops()))
+ .shutdown_timeout(1)
+ .bind(("127.0.0.1", 8080))?
+ .run()
+ .await
}