This project is part of the Microverse curriculum in JavaScript course!
Explore the docs
Live Version
Report Bug
-
Request Feature
This is a small Weather-Report application where the user can select a city from a list and retreive the weather information about the requested city. Available more than 200.000 location
- Screen Shots
- About the Project
- Application Instructions
- Live Version
- System Requierments
- Development
- Dependencies
- Built With
- Contributors
- Acknowledgements
The project uses asynchronus flow and follows the MVC principles.
The main control is applied in index.js.
Partially,
- the model for countries is implemented in countriesDB.js creating a data set of countries stored in dist/countries.json
- the model for cities is implemented in citiesDB.js creating a data set of cities stored in dist/cities.json
- the main consept is controlled in index.js
- first a callback function (citySelected) is supplied to the interface elements that represent a city (city buttons)
- the callback receives the requested city.
- calls an asynchronous API fetch procedure provided a callback (cityWeatherArrived) to receive the weather data for the requested city
- the city weather data that arrived are passed to the interface module cityWeatherInterface.js
- the module cityWeatherInterface.js contains procedures to update the interface information with the new data
- An initial population is performed when the localStorage is empty of Favorites by data held in seed.js.
- Shorthand commands for creating and accessing elements are used and are held in utils.js.
-
The application comes with some initial data about the favotires cities held in seed.js file
-
Also, there are 200.000 locations to be invoked
-
The favorite cities list is on the left. Clicking a city button an http request is generated to get information about the weather at the requested city.
- the received data are passed to the weather interface (cityWeatherInterface).
- click the units button at the top-right to toggle between Fahrenheit and Celcius
- play around selecting a particular country's cities and select a city to view their weather
- JavaScript Enabled
- You need to Disable Cross-Origin-Restrictions from your browser if you want to open the index.html from your file system without using a server.
- Clone the project
https://github.com/ioanniskousis/Weather-Report.git
Use VSCode and Live Server to show index.html
Since webpack is used, run 'npm run build' on you terminal before opening
please run
npm run build
to comply with the dependencies held in package.json
This project was built using these technologies.
- JavaScript (ES6)
- HTML5
- CSS3
- webpack
- APIs
- Git - GitHub
- ESLint
- Stylelint
- Stickler
👤
- Github: @ioanniskousis
- Twitter: @ioanniskousis
- Linkedin: Ioannis Kousis
- E-mail: jgkousis@gmail.com