Last active
April 27, 2018 09:43
-
-
Save josemariagarcia95/de656621dc91b22ad8889bc64b80dc3f to your computer and use it in GitHub Desktop.
/sensor endpoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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