explore uwsgi_app for production!

This commit is contained in:
Russell Ballestrini 2025-01-22 12:06:38 +00:00
parent d58a8c6638
commit c5156d6a81

8
app.py
View file

@ -1220,7 +1220,7 @@ def view_namespace_logs_view(request):
################################################################################
def main(global_config=None, **settings):
def main(*config, **settings):
# Configure logging
logging.basicConfig(level=logging.INFO)
@ -1317,7 +1317,11 @@ def main(global_config=None, **settings):
return config.make_wsgi_app()
# Expose the WSGI application callable for uwsgi
uwsgi_app = main({})
if __name__ == "__main__":
app = main()
app = main({})
log.info(f"Serving on http://{HOST}:{PORT}")
serve(app, host=HOST, port=PORT)