Skip to content

MALB1993/weather-with-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

A simple weather application built with JavaScript that fetches and displays weather information using a weather API.

Table of Contents

Features

  • Fetch current weather information for a specific location.
  • Display temperature, weather conditions, humidity, and wind speed.
  • Responsive design for different screen sizes.
  • Error handling for invalid location inputs.

Demo

You can check out the live demo of the app here.

Installation

  1. Clone the repository:
    git clone https://github.com/MALB1993/weather-with-js.git
  2. Navigate to the project directory:
    cd weather-app
  3. Open index.html in your favorite browser to run the app locally.

Usage

  1. Enter the name of the city in the input field.
  2. Click the "Get Weather" button to fetch and display the weather information.

API

This application uses the OpenWeatherMap API to fetch weather data.

How to Get an API Key

  1. Sign up at OpenWeatherMap.
  2. Go to the API keys section in your account.
  3. Generate a new API key.

Configuration

Replace YOUR_API_KEY in the script.js file with your actual API key.

const apiKey = 'YOUR_API_KEY';

npm

  1. install npm
   npm install
  • Development
   npm run dev

if you want change port goto package.json line-7 => scripts => dev "dev": "vite --port=YOUR_PORT",

   http://localhost:3000

-Build Project

   npm run build

-Preview

   npm run preview

Technologies

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Additional Notes:

  1. Demo Section: Update the demo link with the actual link to your live app if it's hosted somewhere.
  2. License Section: Ensure you have a LICENSE file in your repository, or you can remove that section if you do not have one.
  3. API Key Instructions: Provide clear instructions on obtaining and setting up the API key, as this is crucial for the app to work.

This README.md provides a comprehensive guide to your weather app, covering all essential aspects from installation to usage and contribution guidelines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors