summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-07 13:11:50 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-07 13:11:50 +0100
commit49f38a56618631576b672c9c9575bb8fcf91badf (patch)
treeef67b36e8d10e4ff96b324f7de022e127023c7cf /src
init
Diffstat (limited to 'src')
-rw-r--r--src/main.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..594491f
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,13 @@
+use actix_web::{web, App, HttpResponse, HttpServer};
+#[actix_rt::main]
+async fn main() -> std::io::Result<()> {
+ HttpServer::new(|| {
+ App::new().service(
+ web::resource("/")
+ .to(|| HttpResponse::Ok().body("Hello from Rust!")),
+ )
+ })
+ .bind("127.0.0.1:8080")?
+ .run()
+ .await
+}