|
|
@@ -40,8 +40,14 @@ def main():
|
|
|
thread.start()
|
|
|
# Start the server
|
|
|
#rut without logs
|
|
|
- uvicorn.run(app, host="0.0.0.0", port=PORT, log_level="info", access_log=False)
|
|
|
+ return app
|
|
|
+
|
|
|
+app = main()
|
|
|
+
|
|
|
+if not app:
|
|
|
+ logger.critical("FATAL: Failed to create FastAPI app.")
|
|
|
+ exit(1)
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- main()
|
|
|
+ uvicorn.run(app, host="0.0.0.0", port=PORT, log_level="info", access_log=False)
|