diff --git a/index.py b/index.py new file mode 100644 index 0000000..c637477 --- /dev/null +++ b/index.py @@ -0,0 +1,18 @@ +from github_webhook import Webhook +from flask_script import Manager +from flask import Flask + +app = Flask(__name__) # Standard Flask app +manager = Manager() +webhook = Webhook(app) # Defines '/postreceive' endpoint + +@app.route("/") # Standard Flask endpoint +def hello_world(): + return "Hello, World!" + +@webhook.hook() # Defines a handler for the 'push' event +def on_push(data): + print("Got push with: {0}".format(data)) + +if __name__ == "__main__": + app.run(host="0.0.0.0")