The Weather App is a web application that provides weather information, packing suggestions (by taking weather and air pollution into consideration) based on the location you specify or your current location.
- Fetch weather data for a specific city.
- Get weather information for your current location.
- Display weather details including temperature, rainfall, and wind speed.
- Provides packing suggestions based on temperature and the chance of rain.
- Alerts you to wear a mask when air pollution levels (PM2.5) exceed 10.
- View a summary of weather data for upcoming days.
- A user-friendly interface.
These instructions will help you set up and run the Weather App on your local machine.
-
Clone this repository to your local machine:
git clone https://github.com/ujjayant-kadian/weather-app.git
-
Navigate to the project directory:
cd weather-app
-
Install the required dependencies using npm package manager:
npm install
-
Create an account on OpenWeatherMap to obtain an API key.
-
Replace your api key in routes/forecast.js:
const apiKey = {YOUR_API_KEY}
-
Run the application:
npm start
The application should now be running locally at http://localhost:3000. Open it in the browser to play with the app.
- Enter the name of a city in the "City" input field.
- Optionally, provide a two-letter country code in the "Country Code" input field.
- Click the "Get Weather" button to retrieve weather information for the specified location.
- Click "Get Weather for Current Location" to fetch weather data based on your current location.
- The application will display weather information, packing suggestions, and a summary of upcoming weather.
CREATED BY UJJAYANT KADIAN AS A PART OF ASSIGNMENT 1 (INTERNET APPLICATIONS)