Static-FS
“Volo-HTTP Static-FS”
Volo-HTTP provides the ServeDir
function for registering static files.
use volo_http::server::{
route::{get, Router},
utils::ServeDir,
};
async fn file_router() -> Router {
Router::new()
.route("/", get(|| async {"Hello, World!"}))
.nest_service("/static/", ServeDir::new("."))
}
where the ServeDir::new
parameter specifies the path to be transmitted
”.”
means transferring all files in the current command execution path.
Last modified
May 13, 2025
: 修复milvus的indexer文档,缺乏”document配置必须搭配fields配置“这一信息,导致容易误用问题 (#1331) (0bf6396)