Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.11 KB

README.md

File metadata and controls

67 lines (44 loc) · 1.11 KB

fahrenheit-celsius-converter


Simple http Fahrenheit/Celsius/Kelvin converter using actix-web.


Note

This is a toy project, not yet finished. It's not recommended to use it in production.

Usage

From terminal:

git clone https://github.com/benzlokzik/fahrenheit-celsius-converter/
cd fahrenheit-celsius-converter
cargo build
cargo run

Via Docker:

docker build -t fahrenheit-celsius-converter .
docker run -p 8080:8080 fahrenheit-celsius-converter

API

Convert Fahrenheit to Celsius

curl -X GET "http://localhost:8080/convert/f_to_c/100"

Convert Celsius to Fahrenheit

curl -X GET "http://localhost:8080/convert/c_to_f/100"

Convert Fahrenheit to Kelvin

curl -X GET "http://localhost:8080/convert/f_to_k/100"

Convert Kelvin to Fahrenheit

curl -X GET "http://localhost:8080/convert/k_to_f/100"

Convert Celsius to Kelvin

curl -X GET "http://localhost:8080/convert/c_to_k/100"

Convert Kelvin to Celsius

curl -X GET "http://localhost:8080/convert/k_to_c/100"