Skip to content

kriztynna/weatherNode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weatherNode is a command line application for Node.js that displays the current day's weather foreast for a given ZIP code. It uses the Forecast.io and GeoNames APIs to fetch the current day's forecast for a given zipcode.

Set up your API keys before running weatherNode

You can add the keys by running

node setup.js

and then entering the keys when prompted. Alternatively, you can enter the keys manually by creating a keys.js file containing your own API keys. The contents should look like so:

var APIKEY = 'yourKeyHere'
var geonamesUser = 'yourUsernameHere';

module.exports.APIKEY = APIKEY;
module.exports.geonamesUser = geonamesUser;

You can get these keys for free (with reasonable usage limits) at

Using weatherNode

Request the forecast for any ZIP code by navigating to the weatherNode directory in your command line, then entering "node forecast.js" followed by the ZIP code of your choice. For example:

node forecast.js 90210

If you pass multiple ZIP codes as arguments, weatherNode will return a forecast for each.

node forecast.js 10001 48222

Fun fact: The 48222 ZIP belongs to a floating post office and its ship addressees: J. W. Westcott II on Wikipedia

About

A command line application for Node.js that fetches the current day's weather forecast for a given ZIP code

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages