Skip to content

Commit

Permalink
🔧 Move axum to the site startup dependency list.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Oct 23, 2024
1 parent 6cef433 commit 9c4f936
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 36 deletions.
30 changes: 0 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ uuid = { version = "^1", features = [
'serde',
] }

image = { version = "^0.25", features = ["gif", "jpeg", "png", "webp"] }
sqids = "^0.4"

log = "^0.4"
env_logger = "^0.11"
tracing = "^0.1"
Expand Down Expand Up @@ -71,33 +68,6 @@ tokio = { version = "^1", features = ["full"] }
tauri = "^2"
tauri-build = { version = "^2", features = ["config-toml"] }

sea-orm = { version = "^1", default-features = false, features = [
"macros",
"proxy",
"with-uuid",
"with-chrono",
"with-json",
"debug-print",
] }
axum = { version = "^0.7", default-features = false, features = [
"macros",
"json",
"query",
"multipart",
] }
axum-extra = { version = "^0.9", features = [
"typed-header",
"multipart",
"cookie",
] }
reqwest = { version = "^0.12", features = [
"cookies",
"gzip",
"brotli",
"json",
"multipart",
] }

[patch.crates-io]
yew = { git = "https://github.com/langyo/yew", branch = "wasi-support-test" }
yew-router = { git = "https://github.com/langyo/yew", branch = "wasi-support-test" }
Expand Down
7 changes: 3 additions & 4 deletions website/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ yew = { workspace = true }
yew-router = { workspace = true }

[dev-dependencies]
env_logger = { workspace = true }
tokio = { workspace = true }
tower = { version = "^0.4", features = ["full"] }

axum = { workspace = true, features = ["default", "query", "multipart"] }
sea-orm = { workspace = true }
yew = { workspace = true }
axum = "^0.7"
tower = { version = "^0.4", features = ["full"] }
6 changes: 5 additions & 1 deletion website/examples/dev/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use tokio::net::TcpListener;

#[tokio::main(flavor = "multi_thread")]
async fn main() -> Result<()> {
env_logger::builder()
.filter_level(log::LevelFilter::Info)
.init();

let port = std::env::var("PORT")
.ok()
.and_then(|s| s.parse().ok())
Expand All @@ -18,7 +22,7 @@ async fn main() -> Result<()> {
.await?
.into_make_service_with_connect_info::<SocketAddr>();

info!("Site will run on port {port}");
info!("Site will run on http://localhost:{port}");

let listener = TcpListener::bind(format!("0.0.0.0:{port}"))
.await
Expand Down
2 changes: 1 addition & 1 deletion website/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl DeclType for App {
<style>
{theme_raw}
</style>
<h1>{"Hikari DEMO"}</h1>

{props.children.clone()}
</>
})
Expand Down

0 comments on commit 9c4f936

Please sign in to comment.