-
Notifications
You must be signed in to change notification settings - Fork 967
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
Augment DB-related examples #955
Comments
Do you mean like deserializing data from POST requests? That is covered in other examples and on docs.rs. You probably want The examples intentionally only cover how to integrate things with axum. For examples on how to actually use tokio-postgres and sqlx you should look at their examples. That is why the examples don't contain any migrations, because its not really relevant for integration with axum. For more extensive examples I recommend looking at ECOSYSTEM.md. There a few demo apps. Probably this one being the easiest to get into. |
@davidpdrsn Thanks for the links. The last link you provided is one that I was looking for. Your explanation makes sense me. One final comment before closing the issue: perhaps the demos could be linked somewhere in the doc on Github for reference? |
What doc do you mean? |
Bad wording. Perhaps the main |
Yeah sure. Do you wanna make a PR for that? |
Fixed in #956 |
Feature Request
Thanks for creating
axum
:) I'm new and have not read all the examples/discussions so this request might have been discussed before already. I feel like raising this topic since it'd benefit me personally.Motivation
As a beginner in using Rust &
axum
to write APIs, I'd appreciate slightly more detailed examples (e.g.sqlx-postgres
andtokio-postgres
) that contain serializing/deserializing data and write/read from DB. This aspect foractix-web
has been covered quite well on the internet. Maybe it's a better experience for a new Rustacean to land onaxum
and just get those examples readily provided instead of searching for an equivalent blog/sample on another framework and migrate the code intoaxum
?Proposal
Expand the examples
sqlx-postgres
andtokio-postgres
to include some dummy models to serialize/deserialize as well as for read/write from DB.Alternatives
Insert some blog posts from
axum
users who write about how to interact with DB. I could not find any satisfactory examples myself.The text was updated successfully, but these errors were encountered: