mgrigoriev / go-currency-rates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Currency Converter

An application in Go for currency conversion using the Central Bank of Russia exchange rates.

How It Works

  • A separate goroutine downloads XML with currency rates every hour and caches them in memory.
  • The HTTP server listens on port 8888 and provides two endpoints:
    • / — usage examples
    • /convert — currency converter

Running the app (two ways)

  1. Wrapper for go run:
    • make run
  2. Building and running a Docker container:
    • make d

Examples of API Requests

Running the tests

make test

About


Languages

Language:Go 89.6%Language:HTML 4.5%Language:Dockerfile 3.5%Language:Makefile 2.4%