olivebot/test/test_flask.py
xszyou 2dca3ad6db 20230315
1、增加edge-tts语音合成(免费)可替换azure-tts(支持情绪化语音);
2、替换flask发行版运行方式。
2023-03-15 02:22:50 +08:00

13 lines
286 B
Python

from flask import Flask
from flask_cors import CORS
from gevent import pywsgi
app = Flask("test_server")
CORS(app, supports_credentials=True)
@app.route('/', methods=['get'])
def abc():
return 'hello world'
server = pywsgi.WSGIServer(('0.0.0.0',5000), app)
server.serve_forever()