init project

Signed-off-by: alok8bb <alok8bb@gmail.com>
This commit is contained in:
2023-07-29 19:22:47 +05:30
commit 2b78a037ff
7 changed files with 1365 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target

1331
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

11
Cargo.toml Normal file
View File

@ -0,0 +1,11 @@
[package]
name = "okiba-backend"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
actix-web = "4"
env_logger = "0.10.0"
log = "0.4.19"

1
README.md Normal file
View File

@ -0,0 +1 @@
# okiba-backend v2

18
src/main.rs Normal file
View File

@ -0,0 +1,18 @@
use actix_web::{get, App, HttpServer};
#[get("/")]
async fn greet() -> &'static str {
"Hello, World"
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
const ADDR: (&str, u16) = ("127.0.0.1", 8080);
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
log::info!("Starting the server at http://{}:{}", ADDR.0, ADDR.1);
HttpServer::new(|| App::new().service(greet))
.bind(ADDR)?
.run()
.await
}

3
test/endpoitns.txt Normal file
View File

@ -0,0 +1,3 @@
/paste
/get/<id>
/status

0
test/test.rest Normal file
View File