Skip to content

Developed following the book Zero To Production In Rust using axum

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mattiapenati/zero2prod-dev

Repository files navigation

Zero To Production (with axum)

Developed following the book Zero To Production In Rust using axum.

A summary of the differences:

  • §3.3: the chosen web framework is axum;
  • §3.5: hyper is used as HTTP client;
  • §3.8: docker compose is used to setting up the test environment:
    $ docker compose -f docker-compose.test.yml -p zero2prod up -d
    $ sqlx database reset -y
  • §3.9: axum::State is used as type safe replacement of axum::Extension and ? operator is used to handle errors;
  • §4.5: traces are collected using Grafana Tempo and they can be inspected using Grafana at the address http://localhost:3000;
  • §5.3: hierarchical configuration is not implemented, configuration can be customized using environment variables; database migrations can be executed on service startup;
  • §6.8: unmaintained project claim is replaced with claym;
  • §6.10: error 422 Unprocessable Entity is used to notify a syntatically correct request, but semantically erroneous;
  • §7.2: hyper is used as HTTP client, HTTP client timeout can be configured using humantime;
  • §7.8: routes are refactored exploiting that Result implements IntoResponse.

About

Developed following the book Zero To Production In Rust using axum

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages