Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
SSR Hydration #2552
SSR Hydration #2552
Changes from 36 commits
5ce4df6
e9b8aa0
dd209e4
7c5a5be
b62f347
02b21bc
bfc7a0f
7f9eae6
7feac4a
f0cd363
b1377bd
09e4275
80eb187
4a653c8
1805c49
a008b5b
3f0ec59
fb65153
cf5f99d
383d6b7
e105e28
23937ff
137f89b
054026d
5fb2ed8
9b23b55
7065ac9
eb5631d
236baa1
6cb88c9
95889da
6d4c364
ffd05f5
bfef5d3
b5dcd2f
9555d4a
5c86c50
73280cd
a339020
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other example uses warp so how about we use axum here? That would show usage with different libraries and should also demonstrate usage with tower
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to rewrite this example with
axum
and cannot seem to get it to match the current warp server's behaviour.ServeDir
.render()
an index html (still requires to readRequest
for path and queries).Doc example I am referring to: https://docs.rs/tower-http/latest/tower_http/services/fs/struct.ServeDir.html#handling-files-not-found
There does not seem to be a way that allows both
ServeDir
to be used and making another response with request being taking into consideration upon file not found?Related: tower-rs/tower-http#240
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hamza1311 Do you know how to do this with axum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried it. I will give it a shot later. We can merge it in as-is and I will hopefully update it soon. I'm probably going to need some help from the #axum in tokio's server though...