Skip to content

Instantly share code, notes, and snippets.

@josemariagarcia95
Last active April 27, 2018 09:43
Show Gist options
  • Save josemariagarcia95/de656621dc91b22ad8889bc64b80dc3f to your computer and use it in GitHub Desktop.
Save josemariagarcia95/de656621dc91b22ad8889bc64b80dc3f to your computer and use it in GitHub Desktop.
/sensor endpoint
//This should be somewhere at the beginning of the file
//var express = require("express");
//var app = express();
//...//
app.get("/api/sensor", function(request, response) {
var res = {};
res.noise = Math.random() * 30 + 40;
response.send(response.jsonp(res));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment