from flask import Flask, jsonify app = Flask(__name__) @app.route('/api/data') def get_data(): return jsonify({"message": "Hello from Flask!"}) if __name__ == "__main__": app.run(port=3000) # Run on port 5000