explore uwsgi_app for production!
This commit is contained in:
parent
d58a8c6638
commit
c5156d6a81
1 changed files with 6 additions and 2 deletions
8
app.py
8
app.py
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue