Add endpoint for getting weather data

This commit is contained in:
Samer Albahra
2019-02-28 09:16:23 -06:00
parent 3ec31ae6e3
commit 7b5939739f
3 changed files with 35 additions and 12 deletions

View File

@@ -16,6 +16,9 @@ if ( !process.env.HOST || !process.env.PORT ) {
app.get( /weather(\d+)\.py/, weather.getWeather );
app.get( /(\d+)/, weather.getWeather );
// Handle requests matching /weatherData
app.get( /weatherData/, weather.showWeatherData );
app.get( "/", function( req, res ) {
res.send( "OpenSprinkler Weather Service" );
} );