Skip to content
Local Weather Viewer. See current, 3-day, and 5-day forecasts from any US zip code.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
documentation
img
js
lib
sass
.gitignore
README.md
index.html

README.md

Local Weather Viewer

View the deployed version

With this app, a user can view current, 3-day, and 5-day forecasts for weather in any US zip code.

The Local Weather Viewer uses the Open Weather Map API to retrieve weather data. The user interface is created with Bootstrap 4, Sass and using SVG icons from Meteocons triggered by API data. Jquery code is encapsulated using Browserify.

Technologies Used

Installation and Setup

Loading Dependencies:

  1. Clone the Local Weather API repository
git clone https://github.com/jsheridanwells/local-weather-api.git
  1. If you do not have Sass on your system, you will need to install it:
gem install sass
  1. Change to the /lib directory
cd lib
  1. Install all Node dependencies
npm install
  1. Run Grunt. This will compile all stylesheets and javascripts to the css/styles.css and dist/app.js files. The app will also open in your browser on localhost:3000
grunt

Note that Grunt will fail the first time. You will need to create an api key file (instructions below) for Grunt to run successfully.

Setting up the Open Weather Map API:

In order for the Local Weather Viewer to work locally you will need to create a separate javascript file to hold your API key.

  1. Follow the instructions at OpenWeatherMap.org for registering and creating an api key.

  2. Once you have your API key, from the root directory, create the api javascript file:

touch js/api.js
  1. Copy the following contents into the api.js file, substituting your own API key on [your API here]:
'use strict';
let api = '[your API here]';

//returns api key and url to api handlers in the application
function getAPI() {
	return {
		apiKey: api,
		url: 'https://api.openweathermap.org/'
	};
}

module.exports = getAPI;

Author

Jeremy Sheridan Wells

jeremywells.org

Github: jsheridanwells

Twitter: @jsheridanwells

You can’t perform that action at this time.