The Weather Checker is a RESTful API built using Node.js and Express
,
providing real-time weather data from the OpenWeatherMap API. This project demonstrates the seamless integration of external APIs into a Node.js backend, allowing clients, including React applications, to retrieve weather information effortlessly.
- Real-Time Weather Data: Provides up-to-date weather information fetched from the OpenWeatherMap API.
- RESTful Architecture: Follows RESTful principles for API design, ensuring scalability and ease of use.
- Node.js and Express: Utilizes Node.js and Express for building a robust and efficient server-side application.
- Public API Integration: Demonstrates the ability to manipulate and present data retrieved from external APIs.
- Cross-Origin Resource Sharing (CORS): Enables secure communication between the API server and client-side applications, including React.
- Node.js: A JavaScript runtime environment that executes server-side code, facilitating the development of scalable and high-performance applications.
- Express: A minimalist web application framework for Node.js, providing a robust set of features for building RESTful APIs and web servers.
- React: A JavaScript library for building interactive user interfaces, enabling the creation of dynamic and responsive front-end applications.
- Axios: A promise-based HTTP client for JavaScript, simplifying the process of making asynchronous HTTP requests from the client to the server.
- OpenWeatherMap API: An external API that provides weather data, including current weather, forecasts, and historical weather data, for various locations worldwide.
- Cross-Origin Resource Sharing (CORS): A mechanism that allows restricted resources on a web page to be requested from another domain, facilitating secure cross-origin communication.
Clone the repository.
Install the required dependencies:
npm i
Run the server:
node app.js
Visit the website and enter your location to check if it will rain tomorrow: http://localhost:3000
- To retrieve weather data, make HTTP requests to the provided API endpoints, specifying the location or coordinates for which you want to fetch weather information. Parse the JSON response to extract the desired weather parameters and display them in your application.
Copyright Β© Shani Bider, 2024
This project is licensed under the MIT License.