add tower and assets
68
Cargo.lock
generated
|
|
@ -9,6 +9,7 @@ dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"axum",
|
"axum",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
"tower-http",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -182,6 +183,12 @@ version = "0.3.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-sink"
|
||||||
|
version = "0.3.32"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-task"
|
name = "futures-task"
|
||||||
version = "0.3.32"
|
version = "0.3.32"
|
||||||
|
|
@ -233,6 +240,12 @@ dependencies = [
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "http-range-header"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "httparse"
|
name = "httparse"
|
||||||
version = "1.10.1"
|
version = "1.10.1"
|
||||||
|
|
@ -326,6 +339,16 @@ version = "0.3.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mime_guess"
|
||||||
|
version = "2.0.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
|
||||||
|
dependencies = [
|
||||||
|
"mime",
|
||||||
|
"unicase",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
|
|
@ -571,6 +594,19 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio-util"
|
||||||
|
version = "0.7.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"futures-core",
|
||||||
|
"futures-sink",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower"
|
name = "tower"
|
||||||
version = "0.5.3"
|
version = "0.5.3"
|
||||||
|
|
@ -587,6 +623,32 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower-http"
|
||||||
|
version = "0.6.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
"bytes",
|
||||||
|
"futures-core",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"http-body",
|
||||||
|
"http-body-util",
|
||||||
|
"http-range-header",
|
||||||
|
"httpdate",
|
||||||
|
"mime",
|
||||||
|
"mime_guess",
|
||||||
|
"percent-encoding",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
"tokio-util",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-layer"
|
name = "tower-layer"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
|
|
@ -619,6 +681,12 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicase"
|
||||||
|
version = "2.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.24"
|
version = "1.0.24"
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,4 @@ edition = "2024"
|
||||||
askama = { version = "0.15.4", features = ["std", "derive"] }
|
askama = { version = "0.15.4", features = ["std", "derive"] }
|
||||||
axum = "0.8.8"
|
axum = "0.8.8"
|
||||||
tokio = { version = "1.50.0", features = ["full"] }
|
tokio = { version = "1.50.0", features = ["full"] }
|
||||||
|
tower-http = { version = "0.6.8", features = ["fs"] }
|
||||||
|
|
|
||||||
15
src/main.rs
|
|
@ -1,3 +1,14 @@
|
||||||
fn main() {
|
use axum::{Router, routing::get};
|
||||||
println!("Hello, world!");
|
use tower_http::services::ServeDir;
|
||||||
|
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() {
|
||||||
|
let app = Router::new()
|
||||||
|
.route("/", get(|| async { "Hello World" }))
|
||||||
|
.nest_service("/static", ServeDir::new("static"));
|
||||||
|
|
||||||
|
let listener = tokio::net::TcpListener::bind("0.0.0.0:7122")
|
||||||
|
.await
|
||||||
|
.expect("Failed to bind to port 7122");
|
||||||
|
axum::serve(listener, app).await.expect("Server error");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
static/audio/startup.mp3
Normal file
BIN
static/badges/88x31computer.gif
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
static/badges/cssisawesome.webp
Normal file
|
After Width: | Height: | Size: 356 B |
BIN
static/badges/kirby.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
static/badges/pink.gif
Normal file
|
After Width: | Height: | Size: 661 B |
BIN
static/badges/queer.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
static/badges/skywardsword.webp
Normal file
|
After Width: | Height: | Size: 201 KiB |
BIN
static/badges/trans.gif
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
static/badges/transrightsnow.webp
Normal file
|
After Width: | Height: | Size: 432 B |
BIN
static/gifs/aboutme.gif
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
static/gifs/abstract.gif
Normal file
|
After Width: | Height: | Size: 4.9 MiB |
BIN
static/gifs/areasofinterest.gif
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
static/gifs/decoration1.gif
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
static/gifs/divider2.gif
Normal file
|
After Width: | Height: | Size: 872 B |
BIN
static/gifs/globe.gif
Normal file
|
After Width: | Height: | Size: 2.1 MiB |
BIN
static/gifs/literatureabout.gif
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
static/gifs/music.gif
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
static/gifs/musicabout.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
static/gifs/otherabout.gif
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
static/gifs/pcgif.gif
Normal file
|
After Width: | Height: | Size: 399 KiB |
BIN
static/gifs/projects.gif
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
static/gifs/tekken.gif
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
BIN
static/gifs/title.gif
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
static/gifs/updates.gif
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
static/gifs/vgabout.gif
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
static/gifs/wtfis.gif
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
static/icons/github.webp
Normal file
|
After Width: | Height: | Size: 906 B |
BIN
static/icons/insta.webp
Normal file
|
After Width: | Height: | Size: 614 B |
BIN
static/icons/spotify.webp
Normal file
|
After Width: | Height: | Size: 870 B |
BIN
static/images/about.webp
Normal file
|
After Width: | Height: | Size: 822 KiB |
BIN
static/images/ashen.webp
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
static/images/bibidraw.webp
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
static/images/bibou.webp
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
static/images/bibu2.webp
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
static/images/boubou.webp
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
static/images/boubouille.webp
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
static/images/cornerbl.webp
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
static/images/cornerbr.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
static/images/cornertl.webp
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
static/images/cornertr.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
static/images/dev.webp
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
static/images/leuf.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
static/images/life.webp
Normal file
|
After Width: | Height: | Size: 571 KiB |
BIN
static/images/music.webp
Normal file
|
After Width: | Height: | Size: 954 KiB |
BIN
static/images/pfp.webp
Normal file
|
After Width: | Height: | Size: 223 KiB |
BIN
static/images/rapla.webp
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
static/images/savall.webp
Normal file
|
After Width: | Height: | Size: 367 KiB |
BIN
static/images/tiledbgpink.webp
Normal file
|
After Width: | Height: | Size: 324 KiB |
BIN
static/images/welcome.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |