diff --git a/npm-debug.log b/npm-debug.log index 91f38f9..bd8ded0 100644 --- a/npm-debug.log +++ b/npm-debug.log @@ -9,7 +9,7 @@ 6 info start myapp@0.0.0 7 verbose unsafe-perm in lifecycle true 8 info myapp@0.0.0 Failed to exec start script -9 verbose stack Error: myapp@0.0.0 start: `forever ./bin/www` +9 verbose stack Error: myapp@0.0.0 start: `forever -w ./bin/www` 9 verbose stack Exit status 1 9 verbose stack at EventEmitter. (C:\Users\Mitchell\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:214:16) 9 verbose stack at emitTwo (events.js:87:13) @@ -26,13 +26,13 @@ 14 error node v4.1.1 15 error npm v2.14.1 16 error code ELIFECYCLE -17 error myapp@0.0.0 start: `forever ./bin/www` +17 error myapp@0.0.0 start: `forever -w ./bin/www` 17 error Exit status 1 -18 error Failed at the myapp@0.0.0 start script 'forever ./bin/www'. +18 error Failed at the myapp@0.0.0 start script 'forever -w ./bin/www'. 18 error This is most likely a problem with the myapp package, 18 error not with npm itself. 18 error Tell the author that this fails on your system: -18 error forever ./bin/www +18 error forever -w ./bin/www 18 error You can get their info via: 18 error npm owner ls myapp 18 error There is likely additional logging output above. diff --git a/routes/temperature.js b/routes/temperature.js index a495f29..db903a9 100644 --- a/routes/temperature.js +++ b/routes/temperature.js @@ -12,15 +12,20 @@ router.get('/', function(req, res, next) { var location = req.query.location; var key = req.query.key; + //implement a key for security + //the esp8266 will send "nan" (not a number) if it has a faulty temperature read + //we do not want to save it if it is not a number if(key == "esp1234" && temperature != "nan" && humidity != "nan"){ - + //create a new object to insert into the database + //using mongoose for object modeling var insert = new info({ temperature: temperature, humidity: humidity, location: location }); + //save information in the database insert.save(function (err) { if (err) return handleError(err); @@ -28,6 +33,7 @@ router.get('/', function(req, res, next) { console.log("--information saved--"); + //send respnse back res.send("Information Logged"); } @@ -38,8 +44,6 @@ router.get('/', function(req, res, next) { res.send("Invalid Authentication"); } - - }); module.exports = router; \ No newline at end of file diff --git a/views/blogposts/newPost.html b/views/blogposts/newPost.html index 3598aeb..6605183 100644 --- a/views/blogposts/newPost.html +++ b/views/blogposts/newPost.html @@ -3,7 +3,7 @@

December 10, 2015 by Mitchell

-

Javascript is a powerfull language that is being utilized mainly on the front end of applications as well on the back end. Javascript has become popular as a back end language because it is built around asynchronous functionality and features a non-blocking API, which is known as Node.js. Node.js is a cross-platform runtume environment for developing server-side web applications. This site is currently using Node.js as a back end and server platform. +

Javascript is a powerful language that is being utilized mainly on the front end of applications as well on the back end. Javascript has become popular as a back end language because it is built around asynchronous functionality and features a non-blocking API, which is known as Node.js. Node.js is a cross-platform runtume environment for developing server-side web applications. This site is currently using Node.js as a back end and server platform.


diff --git a/views/index.ejs b/views/index.ejs index 1737b5a..6096624 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -32,7 +32,7 @@

mitchellG.me

-

A "blog" about computer related projects that I find interesting.

+

A site in which I share information about my personal projects.

@@ -177,7 +177,7 @@