mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-07-03 15:41:27 +00:00
Compare commits
2 commits
76a4926995
...
928d95f9d0
| Author | SHA1 | Date | |
|---|---|---|---|
| 928d95f9d0 | |||
| e765a4129f |
1 changed files with 5 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from flask import Flask
|
||||
from flask import Flask, jsonify
|
||||
from src.clover_sqlite.models.questions import Question
|
||||
app = Flask(__name__)
|
||||
|
||||
|
|
@ -17,6 +17,10 @@ async def init_data():
|
|||
|
||||
return "failed"
|
||||
|
||||
@app.route("/ping", methods=["GET"])
|
||||
def ping():
|
||||
return jsonify({"status": "ok", "message": "pong"}), 200
|
||||
|
||||
def start_flask():
|
||||
print("Flask启动中...")
|
||||
app.run(host='0.0.0.0', port=5001, debug=False, use_reloader=False)
|
||||
Loading…
Reference in a new issue