1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 18:32:50 +00:00

hopefully final - switched to get

This commit is contained in:
2015-08-31 20:55:45 -05:00
parent a18a6ce55c
commit 245cef5d2a
2 changed files with 6 additions and 6 deletions

View File

@@ -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);
/**

View File

@@ -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"){