- Clone the repository
git clone https://github.com/agadilkhan/currency-rate.git
- Install dependencies
go mod tidy
- Create config.yaml file in config folder, copy config.yaml.example and fill missing values
To create the currency table
migrate -path migrations/ -database "postgresql://username:password@localhost:5432/database_name?sslmode=disable" -verbose up
go run cmd/main.go
http://localhost:8080/api/currency
- list of all currencieshttp://localhost:8080/api/currency/:code
- get currency by codehttp://localhost:8080/api/currency/force-update
- force update