Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@marcinbunsch
Created April 19, 2017 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcinbunsch/2248c759e4629bc66de206a24526a0e6 to your computer and use it in GitHub Desktop.
Save marcinbunsch/2248c759e4629bc66de206a24526a0e6 to your computer and use it in GitHub Desktop.
Groove Webhook Handler Example
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!')
})
{
"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