Replies: 1 comment
-
你改变一下,把路由分级就行了,根路由 / 二级路由/admin 三级路由 /x |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Subject: Seeking Help with Actix-web Routing Structure Similar to Axum
Hello everyone,
I really appreciate Actix's high performance, but I'm trying to improve my routing setup to achieve two main goals:
Route Organization:
I want to clearly separate authenticated and non-authenticated routes like Axum does
Prefer writing full path routes rather than segmented ones
Currently using scope() which feels less clean than Axum's approach
Frontend Support:
Need proper Vue.js SPA support (serving static files with fallback to index.html)
Here's my current Actix implementation:
In Axum, I noticed you can:
Combine multiple Router::new() instances cleanly
Use .nest_service() with proper SPA fallback handling
Question: How can I achieve similar route organization and frontend handling in Actix-web? Any suggestions for making the authenticated/non-authenticated separation cleaner while maintaining full path routes?
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions