|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- from flask import Flask, jsonify, Response, request
-
-
- app = Flask(__name__)
-
-
- @app.route('/GETQUESTION', methods=['GET'])
- def test():
- test_dict = {'TEST': 'Dies ist eine Testfrage',
- 'firstanswer': 'erste Antwort',
- 'secondanswer': 'zweite Antwort',
- 'thirdanswer': 'dritte Antwort'}
- return jsonify(test_dict)
-
- @app.route('/connection', methods=['GET'])
- def connection():
- return Response(status=200)
-
- @app.route('/teamsize', methods=['POST'])
- def teamsize():
- team_size = request.json
- print(team_size)
- print(type(team_size))
- return Response(status=200)
-
- @app.route('/scoreboard', methods=['GET'])
- def scoreboard():
- pass
-
- @app.route('/check', methods=['GET'])
- def check():
- pass
-
- @app.route('/reset', methods=['GET'])
- def reset():
- return Response(status=200)
-
-
- def main():
- ## ASUS Router
- # app.run(host='192.168.50.79', port=5555, debug=True)
-
- ## Postman
- app.run(host='127.0.0.1', port=5555, debug=True)
-
- if __name__ == '__main__':
- main()
-
-
|