Translates a pokemon description to Shakespeare
ShakespeareMon is a Rest API written in Rust. It listens /pokemon/{name}
endpoint to get a pokemon name, gets its
description from PokeAPI and then, returns the translation of it by Shakespeare
.
This codebase was created to demonstrate a simple backend application built with Rust and actix-web
. It includes unit
and integration tests using wiremock-rs.
- Rust 1.49 (see here for instructions)
using cargo
cargo run
using Docker
docker build -t shakespearemon .
docker run -p 8080:8080 shakespearemon
Testing the endpoint
curl --location --request GET 'http:https://localhost:8080/pokemon/pikachu'
cargo test
- Caching in
Dockerfile
so, it'll take less time at deployment. - Cannot deserialize returning exceptions in integration tests to check against so, tests work by status codes.