Skip to content

Commit c94dbaf

Browse files
authored
Merge pull request #153 from sfdye/python-hooks
Add python simple hook implementation
2 parents 88ed0ea + 24ac593 commit c94dbaf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flask==0.12.2
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from __future__ import print_function
2+
from flask import Flask, request
3+
4+
app = Flask(__name__)
5+
6+
# Change ngrok listening port accordingly
7+
# ./ngrok http 5000
8+
9+
10+
@app.route("/payload", methods=['POST'])
11+
def payload():
12+
print('I got some JSON: {}'.format(request.json))
13+
return 'ok'

0 commit comments

Comments
 (0)