修复了在本地可以使用但是在heroku部署后无法使用的bug

This commit is contained in:
MarkusJoe
2022-02-26 14:12:57 +08:00
parent bee01cc804
commit 133a8cb24d
2 files changed
+2 -7

No files matched your search

+2 -1
View File
@@ -27,6 +27,8 @@ app = Flask(__name__, static_url_path='')
app.config['JSON_SORT_KEYS'] = False # 设置JSON消息不根据字母顺序重新排序
app.config['JSON_AS_ASCII'] = False # 设置JSON消息显示中文
conf = Settings()
def build_page(name: str, length: int, theme: str) -> list[bool or Response] or list[bool or Any] or list[bool or str]:
"""
@@ -174,7 +176,6 @@ def index() -> Response:
if __name__ == '__main__':
conf = Settings()
logger.info(f'服务器已在 http://127.0.0.1:{conf.port} 运行')
try:
server = pywsgi.WSGIServer((conf.host, conf.port), app, log=None) # log=None 关闭日志输出, 使用自写的日志器记录
-6
View File
@@ -120,9 +120,3 @@ class SQLite:
conn.close()
if __name__ == '__main__':
print('MySQL数据库并未开发完成暂时只能使用SQLite数据库\n'
'如果你想帮助开发MySQL的支持你可以在./bin/tests内找到MySQL_.py并继续开发\n'
'开发进度: 已经完成 删, 改, 增, 查, 以及查询已有的表\n'
'获取配置文件直接使用from bin.utils.settings import Settings\n'
'可以直接实例化并使用此类, 调用Settings内的属性可以直接获取对应的信息')