first commit

This commit is contained in:
Богдан Торхов 2024-12-08 18:45:23 +03:00
commit 4de8532a79
6 changed files with 1540 additions and 0 deletions

0
README.md Normal file
View File

1
backend/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

1509
backend/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

10
backend/Cargo.toml Normal file
View File

@ -0,0 +1,10 @@
[package]
name = "backend"
version = "0.1.0"
edition = "2021"
[lints.rust]
unused_imports = "allow"
[dependencies]
actix-web = "4"

19
backend/src/main.rs Normal file
View File

@ -0,0 +1,19 @@
use actix_web::{get, web, App, HttpServer, Responder};
#[get("/")]
async fn index() -> impl Responder {
"Hello, World!"
}
#[get("/{name}")]
async fn hello(name: web::Path<String>) -> impl Responder {
format!("Hello {}!", &name)
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index).service(hello))
.bind(("127.0.0.1", 8080))?
.run()
.await
}

1
frontend Submodule

@ -0,0 +1 @@
Subproject commit edaac51ae95277858d348bec72bf5cf4edf45796