Skip to content

benzlokzik/fahrenheit-celsius-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"