Skip to content

Commit

Permalink
Add an events endpoint to assist debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
lornajane committed Sep 12, 2018
1 parent d9c6c1a commit 79d3d6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// create a new express server
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(bodyParser.json());

// start the app and listen on port 5000
app.listen(app.get('port'), '127.0.0.1', function() {
Expand Down
7 changes: 7 additions & 0 deletions lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,11 @@ module.exports = function(app){
}
]);
});

app.post('/event', function(req, res) {
// uncomment to get the full detail of every event
// console.log(req.body);

console.log("Event Info: " + req.body.status);
});
};

0 comments on commit 79d3d6d

Please sign in to comment.