Created
April 19, 2017 08:27
-
-
Save marcinbunsch/2248c759e4629bc66de206a24526a0e6 to your computer and use it in GitHub Desktop.
Groove Webhook Handler Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const app = express(); | |
const bodyParser = require('body-parser'); | |
const options = {}; | |
app.use(bodyParser.json()); // for parsing application/json | |
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded | |
app.post('/groove/ticket/assign', function(req, res) { | |
console.log(req.body) | |
res.send('') | |
}); | |
app.listen(5000, function () { | |
console.log('Example app listening on port 5000!') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "webhooks", | |
"version": "0.0.0", | |
"description": "ERROR: No README.md file found!", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": "", | |
"author": "", | |
"license": "BSD", | |
"dependencies": { | |
"express": "~4.15.2", | |
"body-parser": "~1.17.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment