mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 10:22:53 +00:00
hopefully final - switched to get
This commit is contained in:
2
bin/www
2
bin/www
@@ -12,7 +12,7 @@ var http = require('http');
|
||||
* Get port from environment and store in Express.
|
||||
*/
|
||||
|
||||
var port = normalizePort(process.env.PORT || '80');
|
||||
var port = normalizePort(process.env.PORT || '3000');
|
||||
app.set('port', port);
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,11 +5,11 @@ require('../models/temperature');
|
||||
var info = mongoose.model('temperature');
|
||||
|
||||
/* GET home page. */
|
||||
router.post('/', function(req, res, next) {
|
||||
var temperature = req.body.temperature;
|
||||
var humidity = req.body.humidity;
|
||||
var location = req.body.location;
|
||||
var key = req.body.key;
|
||||
router.get('/', function(req, res, next) {
|
||||
var temperature = req.query.temperature;
|
||||
var humidity = req.query.humidity;
|
||||
var location = req.query.location;
|
||||
var key = req.query.key;
|
||||
|
||||
if(key == "esp1234"){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user