mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 10:22:53 +00:00
minor changes as well as new post
This commit is contained in:
@@ -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.<anonymous> (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.
|
||||
|
||||
@@ -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;
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<p class="blog-post-meta">December 10, 2015 by Mitchell</p>
|
||||
|
||||
<p>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.
|
||||
<p>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.
|
||||
</p>
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="blog-header">
|
||||
|
||||
<h1 class="blog-title">mitchellG.me</h1>
|
||||
<p class="lead blog-description">A "blog" about computer related projects that I find interesting.</p>
|
||||
<p class="lead blog-description">A site in which I share information about my personal projects.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
<footer class="blog-footer">
|
||||
<p>Site created and managed by Mitchell Gerber</p>
|
||||
<span>©2015</span>
|
||||
<span>©2015-2016</span>
|
||||
<br>
|
||||
<span>Glyphicons provided by</span><br>
|
||||
<a href="http://glyphicons.com/" target="_blank"><span>glyphicons.com</span></a>
|
||||
|
||||
Reference in New Issue
Block a user