Skip to content

Instantly share code, notes, and snippets.

@sintaxi sintaxi/
Created May 13, 2016

What would you like to do?
webhook for surge

Example of a webhook server:

var http = require('http')
var express    = require('express')
var bodyParser = require('body-parser')

var app = express()

// parses application/json

app.use(function (req, res, next) {
  console.log(req.body) // output hook data!

console.log('Server running at')

Test your webhook server:

curl -H "Content-Type: application/json" -X POST -d '{"hello":"world"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.