Skip to content

Testing out the Axum web framework with a small backend coding challenge.

Notifications You must be signed in to change notification settings

Yukigeshiki/coding-challenge-rust

Repository files navigation

coding-challenge-rust

build build

Create an API server using Axum which will return random animal facts. The service should have the following:

  • Receive the following inputs as arguments, environment variables, configuration, etc.

    • Port to start on

    • Type of fact to return with valid options

      • cat

      • dog

      • any (randomize the type on each request)

      • … assume more animals will be added in the future

    • Anything else you feel is needed

  • Have the endpoint /fact return a random fact

{
    "fact": "Three of the 12 dogs on the Titanic survived.",
    "animal": "dog"
}
  • Assume this is a production-grade application. So create:

    • Tests

    • Logs

    • Handle errors

    • etc.

To run the application:

cargo run

To test the application:

cargo test

About

Testing out the Axum web framework with a small backend coding challenge.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published