trying to persist the db again

This commit is contained in:
Martin Donnelly 2015-11-17 10:52:30 +00:00
parent 2243a605a2
commit a3b0982f19

View File

@ -58,6 +58,8 @@ router.get('/', function(req, res, next) {
var t = req.query;
console.log('t:');
console.log(JSON.stringify(t));
if (req.query != {} && req.query.temp != null)
{
// createDB();
@ -77,17 +79,31 @@ router.get('/', function(req, res, next) {
});
router.get('/reading', function(req, res, next) {
var now = new Date();
var t = req.query;
console.log('t:');
console.log(JSON.stringify(t));
res.writeHead(200, {"ContentType": "application/json"});
//res.send(JSON.stringify(t));
res.end(JSON.stringify({}));
});
router.post('/', function(req, res, next) {
"use strict";
console.log('POST');
});
});
router.get('/all', function(req, res, next) {
"use strict";
console.log('Selecint all..');