https://github.com/fwzmhmd/weather-command-line
A Node.js command line application for accessing the weather
https://github.com/fwzmhmd/weather-command-line
api cli command-line commandline es6 javascript json json-api node-js nodejs project
Last synced: about 1 month ago
JSON representation
A Node.js command line application for accessing the weather
- Host: GitHub
- URL: https://github.com/fwzmhmd/weather-command-line
- Owner: fwzmhmd
- License: mit
- Created: 2018-03-27T18:25:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-27T20:32:11.000Z (about 7 years ago)
- Last Synced: 2025-02-01T11:44:29.257Z (3 months ago)
- Topics: api, cli, command-line, commandline, es6, javascript, json, json-api, node-js, nodejs, project
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Weather Command Line
A Node.js command line application for accessing the current weather# Getting Started
### Clone the repository```
$ git clone [email protected]:fwzmhmd/weather-command-line.git
```### Prerequisites
Install Node.js from the Official [Website](https://nodejs.org)
Check if you have node installed
```
$ node -v
```# API Key
### **Sign Up**1. **Go to [OpenWeatherMap](https://home.openweathermap.org/users/sign_up) to get an API Key**
2. **Create an Account**

3. **Goto API keys tab**

4. **Copy API Key**

### **Connect API**
1. Create a file called `api.json`
2. Copy/Paste the following:
```
{
"key": ""
}
```
3. Replace `` with your key from [OpenWeatherMap](https://home.openweathermap.org/api_keys)
4. Save the file# How to Use
### Search a location by City
```
$ node app.js city-name
```
```
$ node app.js city-name,country-code
```
### Search a location by ZIP Code```
$ node app.js zip-code,country-code
```
_If country code is not specified with zip code then the search works for USA as a default_
```
$ node app.js zip-code
```# Examples
### Search a location by City
```
$ node app.js london
```
```
$ node app.js london,uk
```
```
$ node app.js paris
```
### Search a location by ZIP Code```
$ node app.js 94040,us
```
_If country code is not specified with zip code then the search works for USA as a default_
```
$ node app.js 94040
```# Authors
**Fawaz Mohamed** - [Github](https://github.com/fwzmhmd)# License
This project is licensed under the MIT License - see [LICENSE](LICENSE.md) file for details# Acknowledgments
* OpenWeatherMap for API