hello world
This commit is contained in:
commit
2b527a325c
4 changed files with 2599 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
2567
Cargo.lock
generated
Normal file
2567
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
13
Cargo.toml
Normal file
13
Cargo.toml
Normal 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
18
src/main.rs
Normal 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"
|
||||
}
|
Loading…
Add table
Reference in a new issue