Server API v1 #1

Merged
luke merged 30 commits from development into main 2024-05-04 20:22:45 +00:00
3 changed files with 1327 additions and 2 deletions
Showing only changes of commit 95c1cf2930 - Show all commits

1313
server/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -5,3 +5,4 @@ edition = "2021"
license = "GPL-3.0-only"
[dependencies]
actix-web = "4.5.1"

View File

@ -1,3 +1,14 @@
fn main() {
println!("Hello, world!");
use actix_web::{App, get, HttpResponse, HttpServer, Responder};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(hello))
.bind(("127.0.0.1", 8000))?
.run()
.await
}
#[get("/")]
async fn hello() -> impl Responder {
HttpResponse::Ok().body("Hello World!")
}