Skip to content

Shakespearemon - Rust Rest API Translation of Pokemon Description By Shakespeare

Notifications You must be signed in to change notification settings

ozer/shakespearemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShakespeareMon

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.

Overview

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.

Getting Started

Setup

Prerequisites

  • Rust 1.49 (see here for instructions)

How to run?

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'

How to run tests?

  • cargo test

Future Work

  • 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.

About

Shakespearemon - Rust Rest API Translation of Pokemon Description By Shakespeare

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published