Initial commit
This commit is contained in:
17
cgi-bin/flask_cgi.py
Normal file
17
cgi-bin/flask_cgi.py
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python
|
||||
import cgitb; cgitb.enable()
|
||||
import os
|
||||
import sys
|
||||
from wsgiref.simple_server import make_server
|
||||
|
||||
# Path to your app.py
|
||||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
||||
|
||||
# Import your Flask app
|
||||
import app
|
||||
|
||||
# Run the WSGI server
|
||||
if __name__ == '__main__':
|
||||
# Cottage-style server for CGI
|
||||
from wsgiref.handlers import CGIHandler
|
||||
CGIHandler().run(app.app)
|
||||
Reference in New Issue
Block a user