List of cities from openweathermap (Source).
Technology stack - NodeJS vs Express.
- Send
GET
request withname
parameter to https://peaceful-oasis-27039.herokuapp.com/api/getCity - Example for searching Lutsk city - https://peaceful-oasis-27039.herokuapp.com/api/getCity?name=luts
- Response will be following:
{
"status": "ok",
"data": [
{
"id": 2853090,
"name": "Plutscheid",
"country": "DE",
"coord": {
"lon": 6.41667,
"lat": 50.083328
}
},
{
"id": 702569,
"name": "Lutsk",
"country": "UA",
"coord": {
"lon": 25.34244,
"lat": 50.759319
}
},
{
"id": 621741,
"name": "Slutsk",
"country": "BY",
"coord": {
"lon": 27.5597,
"lat": 53.027401
}
}
]
}
This app using in weather application.