Skip to content
Browse files

update express config, add demo config, ignore node_modules dir

  • Loading branch information...
1 parent b2d4e01 commit 24f8ed71e45f551eabf7b8a7232a99f04ba46cae @pstoellberger pstoellberger committed Nov 14, 2013
Showing with 17 additions and 5 deletions.
  1. +2 −1 .gitignore
  2. +5 −4 app.js
  3. +10 −0 demo.config.js
View
3 .gitignore
@@ -2,4 +2,5 @@ config.yaml
.project
.settings
archive
-buffer
+buffer
+node_modules
View
9 app.js
@@ -34,19 +34,20 @@ try {
};
} catch (e) {}
var app = options === undefined ?
- require('express').createServer() :
- require('express').createServer(options);
+ express() :
+ express(options);
var bodyParser = express.bodyParser();
// Properly handle errors
+/*
app.error(function(err, req, res, next) {
if (err instanceof SyntaxError) {
res.send({ error: 'Could not parse data' }, 415);
} else {
res.send({ error: 'Internal Server Error' }, 500);
}
});
-
+*/
// Status page
app.all('/', function(req, res, next) {
telemetry.get_status(req, res, next);
@@ -62,4 +63,4 @@ app.post('/input', bodyParser, function(req, res, next) {
telemetry.bulk_load(req, res, next);
});
-module.exports = app;
+module.exports = app;
View
10 demo.config.js
@@ -0,0 +1,10 @@
+var config = {
+ "type" : "json",
+ "archive": "/tmp/telemetry/",
+ "buffer": "/tmp/telemetry/",
+ "input": "demo"
+};
+
+exports.inputs = {
+ demo: [ config ]
+}

0 comments on commit 24f8ed7

Please sign in to comment.
Something went wrong with that request. Please try again.