switch to asfquart (#42)
diff --git a/README.md b/README.md
index 22a69bf..ffe41b0 100644
--- a/README.md
+++ b/README.md
@@ -13,9 +13,12 @@
```
python3 -m venv venv
source venv/bin/activate
-pip install Flask
```
+Download the quart framework https://github.com/apache/infrastructure-asfquart/ and install it
+into the virtualenv we just made.
+
+
Now, we can start the SMEE client to start receiving events from GitHub.
```
smee -u https://smee.io/wfaiAis5XU4SHXrC -t http://localhost:3000/webhook
diff --git a/webhook-receive.py b/webhook-receive.py
index f251ef3..b30a610 100644
--- a/webhook-receive.py
+++ b/webhook-receive.py
@@ -1,8 +1,10 @@
-from flask import Flask, request, jsonify
-from yaml import load, dump
-from yaml import Loader, Dumper
+import asfquart
-app = Flask(__name__)
+from quart import request, jsonify
+from yaml import load
+from yaml import Loader
+
+app = asfquart.construct("merge-queue-webhook")
with open("config.yml") as fp:
config = load(fp, Loader=Loader)
@@ -11,8 +13,8 @@
@app.route('/webhook', methods=['POST'])
-def webhook_receiver():
- payload = request.json
+async def webhook_receiver():
+ payload = await request.get_json()
event = request.headers.get("X-Github-Event")
action = payload.get("action")
@@ -48,4 +50,4 @@
if __name__ == '__main__':
- app.run(debug=True, host='localhost', port=3000)
+ asfquart.APP.run(port=3000)