Initial commit
This commit is contained in:
parent
c785944bae
commit
f3b692ea5b
34 changed files with 1449 additions and 0 deletions
14
test/mod-wsgi-test-app/app.py
Normal file
14
test/mod-wsgi-test-app/app.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
import mod_wsgi.server
|
||||
|
||||
mod_wsgi.server.start(
|
||||
'--log-to-terminal',
|
||||
'--port', '8080',
|
||||
'--trust-proxy-header', 'X-Forwarded-For',
|
||||
'--trust-proxy-header', 'X-Forwarded-Port',
|
||||
'--trust-proxy-header', 'X-Forwarded-Proto',
|
||||
'--processes', os.environ.get('MOD_WSGI_PROCESSES', '1'),
|
||||
'--threads', os.environ.get('MOD_WSGI_THREADS', '5'),
|
||||
'--application-type', 'module',
|
||||
'--entry-point', 'wsgi'
|
||||
)
|
||||
2
test/mod-wsgi-test-app/requirements.txt
Normal file
2
test/mod-wsgi-test-app/requirements.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mod_wsgi
|
||||
Flask
|
||||
9
test/mod-wsgi-test-app/wsgi.py
Normal file
9
test/mod-wsgi-test-app/wsgi.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from flask import Flask
|
||||
application = Flask(__name__)
|
||||
|
||||
@application.route('/')
|
||||
def hello():
|
||||
return b'Hello World from mod_wsgi hosted WSGI application!'
|
||||
|
||||
if __name__ == '__main__':
|
||||
application.run()
|
||||
Loading…
Add table
Add a link
Reference in a new issue