This is a simple weather application that fetches weather data from an API and displays it to the user. It provides current weather information such as temperature, humidity, wind speed, and weather conditions for a given location.
- Get current weather data for a specified location
- Display temperature in Celsius or Fahrenheit
- Display weather conditions (e.g., sunny, cloudy, rainy)
- Show additional information like humidity and wind speed
- Automatically detect user's location (optional)
-
Clone the repository:
git clone https://github.com/your-username/weather-app.git
-
Navigate to the project directory:
cd weather-app
-
Install dependencies:
npm install
-
Obtain an API key
To use this application, you need to obtain an API key from a weather data provider. This app supports various weather APIs such as OpenWeatherMap, Weatherbit, and AccuWeather. Sign up on their websites to get an API key.
-
Set up the API key
Open the
config.js
file in the project's root directory and replace'YOUR_API_KEY'
with your actual API key. -
Start the application
npm start
-
Open the application in your browser
Open your preferred web browser and go to
http://localhost:3000
to see the Weather App in action.
The config.js
file contains configuration options for the application:
API_KEY
: Your weather API key. Replace'YOUR_API_KEY'
with your actual API key.
- HTML
- CSS
- JavaScript
- Node.js
- Express.js
This application uses a weather API to fetch weather data. The API used can be configured in the config.js
file.
This project is licensed under the MIT License.