From b4c48922cca4a66dbf47e94627cae4e53cb9eb79 Mon Sep 17 00:00:00 2001 From: Edgar Cajusol <78707201+EdgarCajusol@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:27:18 -0500 Subject: [PATCH] Update main.py --- main.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index f781854..575dd43 100644 --- a/main.py +++ b/main.py @@ -1,13 +1,12 @@ -from flask import Flask, jsonify -import os +from flask import Flask, request app = Flask(__name__) - -@app.route('/') -def index(): - return jsonify({"Choo Choo": "Welcome to your Flask app 🚅"}) - +@app.route('/webhook', methods=['POST']) +def webhook(): + data = request.json + print(data) + return '', 200 if __name__ == '__main__': - app.run(debug=True, port=os.getenv("PORT", default=5000)) + app.run(port=5000)