Skip to content

Commit

Permalink
feat: add webhook example
Browse files Browse the repository at this point in the history
  • Loading branch information
trmaphi committed Nov 27, 2019
1 parent 644be21 commit 39a2ba2
Show file tree
Hide file tree
Showing 5 changed files with 1,323 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.vscode/

.idea/
out/
out/

node_modules/
17 changes: 17 additions & 0 deletions webhook-js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const express = require('express');
const bodyParser = require('body-parser');

const PORT = 8080;

const app = express();

app.use(bodyParser.json({ extended: true }));

app.use('/eventEmit', (req, res) => {
console.log('eventEmit payload', req.body);
res.status(200).send(req.body);
});

app.listen(PORT, () => {
console.log(`Listen payload`);
});
Loading

0 comments on commit 39a2ba2

Please sign in to comment.