Apparently the English are always talking about the weather? What better way to compliment that opening conversation topic than with reference to a Weather App?
The App utilizes an API built by the MCR Codes Development Team and has been built using React and basic CSS styling. This has been designed to work on desktop & mobile.
Weather App has the following features:
You can search by city.
The app has built in error handling to catch any city names that are returned as a 404 from the API. Server errors 500 are always handled.
Upon entering a valid city name and selecting 'Search', a five day forecast is displayed showing the following details for each of the five days:
- Day, Date & Month
- Temperature in °C
- A description e.g. clouds
- A weather Icon
Users then have the option of selecting more details for each of the days by pressing the 'More Details' button. These details are displayed at the foot of the page and display the following:
- Day, Date & Month
- Max Temp in °C
- Min Temp in °C
- Wind Speed in mph
- Wind Direction
- Humidity in %
You can view a completed version of the app here:
https://weather-app-v-3-0.now.sh/
Alternatively you can obtain the tutorial bny becoming a student of Manchester Codes here:
https://www.manchestercodes.com/
You are free to pull the code and inspect it should you wish.
All the JavaScript is tested using Jest. To run the tests yourself you will need to open your terminal and install jest as a developer dependency by typing the following into the command line: npm install -D jest
.
Once completed you will ne able to run the test by typing npm test
.
James Barrington
Manchester Codes (https://github.com/MCRcodes)