From 9dd2d6b6eb59509f0d8f882847286cb134464e99 Mon Sep 17 00:00:00 2001 From: 6229a7eae6aa6d55d0288ba8 <6229a7eae6aa6d55d0288ba8@devide> Date: Fri, 14 Apr 2023 10:59:00 +0000 Subject: [PATCH] Fri Apr 14 10:59:00 UTC 2023 inscode --- main.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 592b097..3c4653f 100644 --- a/main.py +++ b/main.py @@ -1,2 +1,13 @@ -print('欢迎来到 InsCode') -print() \ No newline at end of file +from flask import Flask, request + +app = Flask(__name__) + +@app.route('/api', methods=['POST']) +def api(): + data = request.get_json() + # 处理接收到的data数据 + response_data = {"result": "success", "data": data} + return response_data + +if __name__ == '__main__': + app.run(host='0.0.0.0', port=5000) \ No newline at end of file -- GitLab