B
B
beduin012018-03-19 17:25:12
Python
beduin01, 2018-03-19 17:25:12

How to properly initialize uWSGI if it's callable is in another function?

uWSGI wants a callable object for input. Right now my code looks like
main.py:
app = create_app()
and is called like this:

uwsgi --http :9000 --wsgi-file main.py --callable app

I want to wrap everything in something like this:
def main():
  app = create_app()

Question. How can I call everything then? After all, the called instance of the application will be in `main()`?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question