hello world

This commit is contained in:
Milim 2024-12-06 15:41:27 +01:00
commit 2b527a325c
No known key found for this signature in database
4 changed files with 2599 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/target

2567
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

13
Cargo.toml Normal file
View file

@ -0,0 +1,13 @@
[package]
name = "gunnhildr"
version = "0.1.0"
edition = "2021"
[dependencies]
actix-web = {version="4.9.0"}
env_logger = "0.11.5"
figment = {version="0.10.19", features=["env"]}
log = "0.4.22"
serde = {version="1.0.215", features=["derive"]}
sqlx = "0.8.2"
tokio = "1.42.0"

18
src/main.rs Normal file
View file

@ -0,0 +1,18 @@
use actix_web::{get, App, HttpServer};
use log::info;
#[actix_web::main]
async fn main() -> Result<(), std::io::Error> {
env_logger::init();
info!("Server starting...");
HttpServer::new(|| App::new().service(hello))
.bind(("127.0.0.1", 6767))?
.run()
.await
}
#[get("/hello")]
async fn hello() -> &'static str {
"hello"
}