Blame view

flaskr/wsgi.py 434 Bytes
23ab5119   Antoine Goutenoir   Add the WSGI scri...
1
2
3
import os
import sys

ca22a79f   Antoine Goutenoir   Review WSGI-like ...
4
PROJECT_ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
23ab5119   Antoine Goutenoir   Add the WSGI scri...
5

ca22a79f   Antoine Goutenoir   Review WSGI-like ...
6
sys.path.append(PROJECT_ROOT_DIR)
23ab5119   Antoine Goutenoir   Add the WSGI scri...
7

ca22a79f   Antoine Goutenoir   Review WSGI-like ...
8
# Only now can we import locals
684a0b87   Antoine Goutenoir   Configure WSGI.
9
# --> Not really true anymore since this file is in flaskr now.
23ab5119   Antoine Goutenoir   Add the WSGI scri...
10
11
12
13
14
from flaskr import create_app

app = create_app('flaskr.settings.ProductionConfig')

if __name__ == "__main__":
6ae5c09e   Antoine Goutenoir   Somehow, someday,...
15
    # Pretty sure we're not using that during WSGI.
684a0b87   Antoine Goutenoir   Configure WSGI.
16
    app.run(host='0.0.0.0', port=80)