Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cycle3: easy_note to rust, hertz_router package #85

Open
wants to merge 1 commit into
base: feat/go_to_rust_cycle2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions go_to_rust/easy_note/src/cmd/api/hertz_router/demoapi/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use volo_http::server::route::Router;

// mock for implement stage
pub fn register() -> Router {
//todo!("implement it");
Router::new()
}
8 changes: 6 additions & 2 deletions go_to_rust/easy_note/src/cmd/api/hertz_router/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
pub mod demoapi;
use volo_http::server::route::Router;

// mock for implement stage


// GeneratedRegister函数的主要功能是为Hertz服务器配置路由和中间件。
pub fn generated_register() -> Router {
Router::new()
// 1. 调用 Register 函数为 Hertz 服务器配置路由和中间件
demoapi::register()
}
Loading