REST API service in GO that interacts with weather data
- To update or create data:
PUT /weather?location=London
- To get current weather:
GET /weather?location=London
{
"Location": "London",
"Temperature": 11,
"Description": "overcast clouds"
}
- Clone repository:
git clone git@github.com:mystpen/weather-api.git
- Go to
weather-api
directory - Create
config.yaml
file with OpenWeatherMap api-token and mongodb database name:
token:
db_name:
- To run project:
make run
go run ./cmd/app/ .