This project is a weather application that allows users to search for historical weather data for a specific city. The application is built using Node.js for the backend and React with Vite for the frontend.
To install and run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/weather-app.git cd weather-app
-
Install backend dependencies:
cd backend npm install
-
Install frontend dependencies:
cd ../frontend npm install
-
Start the backend server:
cd ../backend npm start
-
Start the frontend server:
cd ../frontend npm run dev
To use the application, open your web browser and navigate to http://localhost:3000
. Enter the name of the city you want to search for historical weather data and click the "Check" button.
Here are some screenshots of the application:
The backend server exposes the following API endpoints:
GET /api/weather/history?city={city}&date={date}
: Retrieves historical weather data for a specific city and date.
The main components of the application are:
CitySearch
: A component that allows users to search for historical weather data by city name.WeatherCard
: A component that displays the historical weather data for the selected city.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.