Pepguy's picture
Update app.py
658e4f8 verified
raw
history blame
514 Bytes
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
# Get the JSON data from the request
data = request.get_json()
# Log the JSON data to the console
print("Received JSON:", data)
# Respond back with a simple JSON message
return jsonify({"status": "success", "message": "Data received"}), 200
if __name__ == '__main__':
# Run the Flask server on port 5000 with debug mode enabled
app.run(debug=True, port=5000)