Minor fixes from previous pull request

This commit is contained in:
Samer Albahra
2016-02-21 13:31:17 -06:00
parent 3b5fa86d39
commit a1145690ca

View File

@@ -9,8 +9,6 @@ var express = require( "express" ),
if ( !process.env.HOST || !process.env.PORT ) { if ( !process.env.HOST || !process.env.PORT ) {
require( "dotenv" ).load(); require( "dotenv" ).load();
host = process.env.HOST || host;
port = process.env.PORT || port;
} }
// Connect to local MongoDB instance // Connect to local MongoDB instance
@@ -27,8 +25,8 @@ mongoose.connection.on( "error", function() {
app.get( /weather(\d+)\.py/, weather.getWeather ); app.get( /weather(\d+)\.py/, weather.getWeather );
app.get( /(\d+)/, weather.getWeather ); app.get( /(\d+)/, weather.getWeather );
app.get('/', function (req, res) { app.get( "/", function( req, res ) {
res.send('OpenSprinkler Weather Service'); res.send( "OpenSprinkler Weather Service" );
} ); } );
// Handle 404 error // Handle 404 error