- Clone
- Activate virtualenv
- Install dependencies
- Run -
gunicorn __init__:app -b localhost:8000
- Navigate to http://localhost:8000/ in your browser
├── __init__.py
├── flask_flow_project
│ ├── __init__.py
│ └── views.py
└── requirements.txt
When ran, and you navigate to http://localhost:8000/, you should see the following in your terminal:
outer __init__.py
inner __init__.py
route loaded!
- When the server is ran, the outer __init__.py file is loaded, which imports the application instance from /flask_flow_project/__init__.py.
- From there the views are imported and when the end user requests the main route,
/
, a GET request is sent. This is handled by the route handler -@app.route('/')
- and a response is sent.