v0.1.X
evie 2 months ago
parent 885c6e6bd9
commit 17f6c045b1
Signed by: evie
GPG Key ID: 928652CDFCEC8099

@ -0,0 +1,2 @@
[build]
rustflags = ["--cfg", "tokio_unstable"]

2307
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -6,3 +6,14 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Core
tokio = { version = "1.25.0", features = ["full"] }
tracing-subscriber = "0.3.16"
# Database
sea-orm = { version = "0.11.0-rc.1", features = ["sqlx-mysql", "runtime-tokio-rustls", "macros"] }
# Web
axum = "0.6.4"
upon = "0.6.0"

@ -1,3 +1,22 @@
fn main() {
println!("Hello, world!");
use std::net::SocketAddr;
use axum::{Router, routing::get};
#[tokio::main]
async fn main() {
tracing_subscriber::fmt::init();
let app = Router::new()
.route("/", get(root));
let listen_addr = SocketAddr::from(([0, 0, 0, 0], 3621));
axum::Server::bind(&listen_addr)
.serve(app.into_make_service())
.await
.unwrap();
}
async fn root() -> &'static str {
"Hewwo??"
}
Loading…
Cancel
Save