- Node.js - Server
- node-fetch - Communication with Weather API
- OpenWeatherMap - Weather API
- Leaflet - Interactive map
- leaflet-color-markers - Map markers
- lodash
Server side:
- Static files (html, css, js, json, images)
- Weather data (upon request, with a predetermined expiration time)
Client side:
- Cities data (names, coordinates, countries etc.)
- Weather data (upon request, with a predetermined expiration time)
- Open command prompt in 'weather-app-avi' folder
- Type 'npm install' to install all the required packages for the application
- Type 'npm start' to start the server
- Open a browser at http://localhost:8080
Route | Description |
---|---|
/ | Root - Weather data is not displayed and map is scaled to fit the world |
/weather?city={city},{country} | City's weather - Displays the weather of the selected city and zooms the map on that city |
Option 1: Select a city from the dropdown list above the weather panel
Option 2: Click on a city marker on the map
Upon selecting a city, the map is zoomed on that city and the city's weather is displayed in the weather panel