Spaces:
Sleeping
Sleeping
| from flask import Flask, request, jsonify | |
| app = Flask(__name__) | |
| 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) | |