olivebot/test/test_flask.py
xszyou 875ed28b58 初始上传
初始上传
2023-12-12 00:03:36 +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()