diff --git a/app.js b/app.js index 03bb157..dedcd90 100644 --- a/app.js +++ b/app.js @@ -49,7 +49,7 @@ app.use(function(req, res, next) { // development error handler // will print stacktrace -/* + if (app.get('env') === 'development') { app.use(function(err, req, res, next) { res.status(err.status || 500); @@ -59,7 +59,7 @@ if (app.get('env') === 'development') { }); }); } -*/ + // production error handler // no stacktraces leaked to user app.use(function(err, req, res, next) { diff --git a/models/temperature.js b/models/temperature.js index 9277961..8b560ca 100644 --- a/models/temperature.js +++ b/models/temperature.js @@ -3,7 +3,7 @@ var mongoose = require('mongoose'); var temperatureSchema = new mongoose.Schema({ temperature: String, humidity: String, - location: String, + located: String, updated: {type: Date, default: Date.now} }); diff --git a/views/index.ejs b/views/index.ejs index 8c8237b..bb252ff 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -8,7 +8,7 @@
ESP8266 With DHT11 Sensor
- Location: <%=query.location%> + Location: <%=query.located%>
Temperature: <%=query.temperature%>°F