Kloud is a simple weather information application that allows users to retrieve real-time weather data for a specific city. Users can enter the name of a city, and Kloud will provide them with the current temperature, a picture representing the weather conditions, "feels like" temperature, humidity, and wind speed for that city.
- Features
- Installation
- Obtaining an OpenWeather API Key
- Configuring the Application with Your OpenWeather API Key
- Usage
- Technologies Used
- Contributing
- License
- City Weather: Enter the name of a city to get detailed weather information.
- Real-time Data: Kloud fetches real-time weather data from a reliable source.
- Weather Picture: A visual representation of the current weather conditions.
- Feels Like: Get information on how the weather feels in addition to the actual temperature.
- Humidity: Find out the humidity level in the selected city.
- Wind Speed: Get the current wind speed in the selected city.
To run Kloud on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/kloud-weather-app.git
-
Navigate to the project directory:
cd kloud-weather-app
-
Install the required dependencies using npm:
npm install
To use Kloud and fetch weather data from the OpenWeather API, you need to obtain an API key. Follow these steps to get your API key:
-
Visit the OpenWeather website.
-
Sign up for a free account or log in if you already have one.
-
After logging in, go to the API Keys section in your account dashboard.
-
Click on the "Generate API Key" button to create a new API key.
-
Give your API key a name and choose the subscription plan that suits your needs.
-
Once your API key is generated, copy it to your clipboard.
To configure Kloud with your OpenWeather API key, follow these steps:
-
Open the
.env
file in the project's root directory if you haven't already. -
Add your OpenWeather API key to the
.env
file like this:OPENWEATHER_API_KEY=your_openweather_api_key
Replace
your_openweather_api_key
with the API key you obtained from the OpenWeather website. -
Save the
.env
file.
Now, your Kloud application is set up to use your OpenWeather API key to fetch weather data.
-
Start the application:
npm start
The application will run on
http://localhost:3000
. -
Open your web browser and go to
http://localhost:3000
. -
Enter the name of the city for which you want to fetch weather information.
-
Click the "Get Weather" button.
-
Kloud will display the current weather data for the specified city.
Kloud is built using the following technologies:
- EJS: For rendering dynamic HTML templates.
- CSS: For styling the user interface.
- JavaScript: For handling user interactions and making API requests.
- Node.js: For server-side scripting.
- Express.js: As the web application framework.
Contributions are welcome! If you have any ideas for improvements or bug fixes, please open an issue or submit a pull request. For major changes, please discuss them in an issue first.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to customize this README to fit your project's specific details and requirements. Users of your project will now have clear instructions on how to obtain and set up their own OpenWeather API key for use with your weather information app.