You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
This discussion was converted from issue #3655 on May 24, 2025 07:15.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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