I Have A Code That Runs Well With gunicorn -b :8080 web:Main In Ubuntu 16.04:
#!/usr/bin/python
# -*- Coding: UTF-8 -*-
def Main(env,start_response):
start_response('200 OK', [('Content-Type','text/html')])
data = "<h1>It Works!</h1>"
return data
Now I Want To Configure Nginx To Use Gunicorn To Serve Python Apps,I've Read The Docs But I Couldn't Understand How To Do That (So I Don't Need To Use gunicorn Command)
I Also Searched A Lot But All The Results Used Django,Flask And VirtualEnv. What I Need Is "Python Web Development From Scratch" In Ubuntu.
Is It Possible To Do This Without Any Framework Or Is It Recommended?
Aucun commentaire:
Enregistrer un commentaire