jeudi 31 mai 2018

How do I write a uwsgi config.ini to serve a simple python script

I am using nginx + uwsgi to serve a python script. I have successfully served the python by by configuring uwsgi through command line using the following command:

uwsgi --plugins syslog,python  --socket 127.0.0.1:3031 --logger syslog:configApi --wsgi-file foobar.py &

How do I achieve the same using a config.ini file?

The content of my python script is just simply printing out "Hello World"

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return ["Hello World"]

Please share some insights if you know how to do this. Million thanks in advance.




Aucun commentaire:

Enregistrer un commentaire