Skip to content

A small Node.js project that uses OpenWeather's current weather data API, checks for weather in the user's inputted country/city

Notifications You must be signed in to change notification settings

swagenough/current-weather-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Weather CLI 🌦️

hi guys and welcome to my Weather CLI project! This simple command-line tool fetches and displays the current weather for any city or country you input. It's a great example of how to integrate APIs in Node.js

Features ☆*: .。. o(≧▽≦)o .。.:*☆

  • User Greeting: The app greets you by your name. Pretty cool right
  • Weather Data: Fetches real-time weather data for any city or country.
  • Error Handling: Provides meaningful error messages if the city is not found or there's an API request issue.

Installation 📦

  1. Clone the repository:

    git clone https://github.com/yourusername/weather-cli.git
    cd weather-cli
  2. Install the dependencies:

    npm install
  3. Link the CLI tool:

    npm link

Usage 🚀

  1. Run the CLI tool:

    weatherAPI
  2. Follow the prompts to enter your name and the city/country for which you want to get the weather.

Example 🌍

$ weatherAPI
Enter your name: John
Enter a country/city name to get the weather: London

Hello John, here is the weather in London!
Temperature: 15°C
Description: light rain

Configuration ⚙️

  • API Key: Don't forget to replace your_api_key in weathercmd.js with your actual OpenWeatherMap API key.

Dependencies 📚

  • axios: Promise-based HTTP client for the browser and Node.js.
  • readline: Node.js module to create an interface for reading data from a Readable stream.

License 📄

This project is licensed under the ISC License.

About

A small Node.js project that uses OpenWeather's current weather data API, checks for weather in the user's inputted country/city

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published