A Node.js command line application for accessing the current weather
$ git clone [email protected]:fwzmhmd/weather-command-line.git
Install Node.js from the Official Website
Check if you have node installed
$ node -v
-
Go to OpenWeatherMap to get an API Key
-
Create an Account
- Goto API keys tab
- Copy API Key
- Create a file called
api.json
- Copy/Paste the following:
{
"key": "<api-key>"
}
- Replace
<api-key>
with your key from OpenWeatherMap - Save the file
$ node app.js city-name
$ node app.js city-name,country-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
$ node app.js london
$ node app.js london,uk
$ node app.js paris
$ 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
Fawaz Mohamed - Github
This project is licensed under the MIT License - see LICENSE file for details
- OpenWeatherMap for API