modulepackage
0.0.0-20210608165736-443043a6c59b
Repository: https://github.com/e-psn/weather-api.git
Documentation: pkg.go.dev
# README
weather-api
A REST API to check the current weather.
https://goweather.herokuapp.com/weather/Santorini
https://goweather.herokuapp.com/weather/{city}
Build
go build
Run
./weather-api
Usage
curl http://localhost:3000/weather/{city}
Example
Request
curl http://localhost:3000/weather/Santorini
Response
{
"temperature":"29 °C",
"wind":"20 km/h",
"description":"Partly cloudy",
"forecast":[
{
"day":1,
"temperature":"27 °C",
"wind":"12 km/h"
},
{
"day":2,
"temperature":"22 °C",
"wind":"8 km/h"
}
]
}