Skip to content

Commit

Permalink
fix: bootstrap type error
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq authored Dec 8, 2023
1 parent 99a7f67 commit e3ab361
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,10 @@ async def handle_404(request):
# 404
app.router.add_route('*', '/{tail:.*}', handle_404)

web.run_app(app, host=config.read_config('common.host'), port=config.read_config('common.port'))
if (__name__ == "__main__"):
try:
web.run_app(app, host=config.read_config('common.host'), port=int(config.read_config('common.port')))
except Exception as e:
logger.error("服务器启动失败, 请查看下方日志")
logger.error(traceback.format_exc())

0 comments on commit e3ab361

Please sign in to comment.