Weather Kun is a web application that provides real-time weather information for any location. It is built using React, Node.js, and the OpenWeatherMap API.
- Get real-time weather information based on IP geolocation
- Search functionality to find weather data for specific locations
- Display temperature, humidity, wind speed, and weather conditions
- React
- Node.js
- Express
- OpenWeatherMap API
-
Fork the repository by clicking the "Fork" button on the GitHub repository page.
-
Clone the forked repository to your local machine:
git clone https://github.com/YourUsername/weather-kun.git
-
Create a
.env
file in theserver
directory with the following content:API_KEY=your_openweathermap_api_key UNITS=metric DEFAULT_CITY=your_default_city CLIENT_URL=http://localhost:3000
Replace
your_openweathermap_api_key
with your OpenWeatherMap API key,metric
with your preferred unit of measurement (e.g.,standard
,metric
,imperial
), andyour_default_city
with the default city for weather information. -
Create a
.env
file in theclient
directory with the following content:REACT_APP_SERVER_URL=http://localhost:4000
Replace
http://localhost:4000
with the URL of your server.
-
Navigate to the server directory:
cd weather-kun/server
-
Install the dependencies:
npm install
-
Start the server:
npm start
The server will start running on http://localhost:4000.
-
Navigate to the client directory:
cd weather-kun/client
-
Install the dependencies:
npm install
-
Start the development server:
npm start
The client application will open in your preferred web browser at http://localhost:3000.
- The application development is complete. You can use the application to fetch real-time weather information for any location by IP geolocation or search for specific locations. The application will display temperature, humidity, wind speed, and weather conditions.
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue on the GitHub repository. If you would like to contribute code, you can fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License.