This Weather App is an Express.js API that fetches current weather data for a specified city using the OpenWeatherMap API. The app provides real-time weather details such as temperature, humidity, wind speed, and a summary forecast. It also includes alerts for high and low temperatures.
- City-based Weather Search: Get weather information for any city.
- Real-time Data: Provides up-to-date temperature, humidity, and wind speed.
- Threshold Alerts: Alerts for high and low temperatures based on configurable thresholds.
- Weather Forecast Summary: Displays a brief forecast summary based on recent weather data.
-
Clone the repository:
git clone https://github.com/your-username/weather-app.git cd weather-app -
Install dependencies:
npm install
-
Set up the
.envfile:Create a
.envfile in the root directory of the project and add the following environment variables:PORT=5000 OPENWEATHER_API_KEY=your_openweather_api_key -
Run the app:
npm start
The server will start on the specified port (default:
5000).
The app issues temperature alerts:
- High temperature: Greater than 35°C.
- Low temperature: Lower than 15°C.


