initial
This commit is contained in:
14
src/main.rs
Normal file
14
src/main.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use actix_web::{web, App, HttpRequest, HttpServer, Responder};
|
||||
|
||||
async fn index() -> impl Responder { "Connection successful" }
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
.service(web::resource("/").to(index))
|
||||
})
|
||||
.bind("127.0.0.1:8080")?
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
Reference in New Issue
Block a user