Created
August 16, 2017 04:31
-
-
Save wildan3105/0854da020028c6eabecdb2fd945f09aa to your computer and use it in GitHub Desktop.
This file contains 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
app.post('/results', function(req, res){ | |
var post = {} | |
post.date = new Date(), | |
post.temp = req.body.temp | |
sql.query('INSERT INTO analog_read SET ?', post, function(err, results, fields){ | |
if(err) throw err; | |
console.log('sent success with value : ', post.temp) | |
res.json({'status':'success!'}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment