From 175e0d6c101fbd0e1e7e9e346e6a3f815130c5fe Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Fri, 9 Oct 2015 17:00:35 -0500 Subject: [PATCH] Add API Key for Open Weather Maps --- routes/weather.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/weather.js b/routes/weather.js index b312186..345072a 100644 --- a/routes/weather.js +++ b/routes/weather.js @@ -221,7 +221,8 @@ function getYesterdayWeatherData( location, callback ) { function getOWMWeatherData( location, callback ) { // Generate URL using The Weather Company API v1 in Imperial units - var url = "http://api.openweathermap.org/data/2.5/weather?units=imperial&lat=" + location[ 0 ] + "&lon=" + location[ 1 ]; + var OWM_API_KEY = process.env.OWM_API_KEY, + url = "http://api.openweathermap.org/data/2.5/weather?appid=" + OWM_API_KEY + "&units=imperial&lat=" + location[ 0 ] + "&lon=" + location[ 1 ]; // Perform the HTTP request to retrieve the weather data httpRequest( url, function( data ) {