watchexec & breaking changes in axum 0.8

This commit is contained in:
2026-05-31 22:55:11 +02:00
parent 9b0155dc9a
commit 690b955d5d
3 changed files with 7 additions and 6 deletions
+5 -5
View File
@@ -1,9 +1,9 @@
use std::{collections::HashMap, sync::Arc};
use axum::{
Router, ServiceExt,
extract::{DefaultBodyLimit, Request},
routing::{delete, get, post},
Router, ServiceExt,
};
use dotenv::dotenv;
use lock::SharedState;
@@ -41,14 +41,14 @@ async fn main() {
let notes_routes = Router::new()
.route("/", post(note::create))
.route("/:id", delete(note::delete))
.route("/:id", get(note::preview));
.route("/{id}", delete(note::delete))
.route("/{id}", get(note::preview));
let health_routes = Router::new().route("/live", get(health::report_health));
let status_routes = Router::new().route("/status", get(status::get_status));
let api_routes = Router::new()
.nest("/notes", notes_routes)
.nest("/", health_routes)
.nest("/", status_routes);
.merge(health_routes)
.merge(status_routes);
let index = format!("{}{}", config::FRONTEND_PATH.to_string(), "/index.html");
let serve_dir =