diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 666d49c..db36ccb 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -136,13 +136,19 @@ cors(corsOptions), (req, res, next) => { for (var i = 0; i < req.body.length; i++){ var obj = req.body[i]; var reslog = new Object(); + reslog.message = obj + reslog.date = var d = new Date(year, month, day, hour, minute, second, millisecond); + + io.emit("logdata", reslog); +/* for (var key in obj){ var value = obj[key]; //console.log("line " + key + ": " + value); reslog.key = key reslog.value = value - io.emit("logdata", reslog); + //io.emit("logdata", reslog); } + */ } //io.in("iot").emit("message", RES);