tokio-rs/axum ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Rust web server using axum that feels clean and easy to extend.

I want a simple API with a few routes like a health check, a home page, and a JSON endpoint for creating and listing users. Use the usual axum style, with request parsing, JSON responses, and good error handling that stays simple. Please wire it up so it runs on Tokio and starts a server on port 3000, and include a couple of realistic examples I can run right away.

Also make it easy to add middleware later for things like logging or timeouts, since I know axum works well with the tower ecosystem. Keep the code ergonomic and minimal, with no unnecessary boilerplate. If you need to check the latest docs online for anything, go ahead and do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab