modified to use events, hopefully will fix the crashing particle

This commit is contained in:
Martin Donnelly 2016-02-12 15:36:28 +00:00
parent 99a857de39
commit b088fb3332

View File

@ -123,6 +123,7 @@ router.post('/', function (req, res, next) {
var t = req.body;
var now = new Date();
console.log('~~~~');
console.log(JSON.stringify(t));
if (t != {} && t.temp != null) {
busEmitter.emit("saveTempData", {time: now.toJSON(), value: parseFloat(t.temp)});