Skip to content

Latest commit

 

History

History
38 lines (36 loc) · 655 Bytes

README.md

File metadata and controls

38 lines (36 loc) · 655 Bytes

Weather API

REST API service in GO that interacts with weather data

Usage

  • To update or create data:
PUT /weather?location=London
  • To get current weather:
GET /weather?location=London
{
    "Location": "London",
    "Temperature": 11,
    "Description": "overcast clouds"
}

Run

  • 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/ .