# flask_server.py
from flask import Flask, request
from flask_cors import CORS

app = Flask(__name__)
CORS(app)  # erlaubt Anfragen von anderen Hosts (z. B. localhost:3000)

@app.route("/signal", methods=["POST"])
def signal():
    data = request.get_json()
    print("got", data)
    return {"status": "ok"}, 200

if __name__ == "__main__":
    app.run(host="127.0.0.1", port=5000)
