feat: Replit平台支持

This commit is contained in:
Soulter
2023-04-25 20:48:04 +08:00
parent 3a80ffad88
commit b0ac2d676c
2 changed files with 36 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
from flask import Flask
from threading import Thread
import datetime
app = Flask(__name__)
@app.route('/')
def main_func():
content = "<h1>QQChannelChatGPT Web APP</h1>"
content = "<p>" + "Online @ " + str(datetime.datetime.now()) + "</p>"
content = "<p>欢迎Star本项目!!!</p>"
return content
def run():
app.run(host="0.0.0.0", port=8080)
def keep_alive():
server = Thread(target=run)
server.start()