This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
1 |
# -*- coding: utf-8 -*- |
2 |
# swtstore->runserver.py |
3 |
|
4 |
# Script to run the application server in development mode |
5 |
|
6 |
import sys |
7 |
import os |
8 |
|
9 |
# Get the path to the base directory of the app |
10 |
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__))) |
11 |
|
12 |
# append the path to the WSGI env path |
13 |
sys.path.insert(0, BASE_DIR) |
14 |
|
15 |
# Import and create the app |
16 |
from swtstore import create_app |
17 |
|
18 |
app = create_app() |
19 |
|
20 |
# Run the server if this script is directly executed |
21 |
# Presumably, this is development mode |
22 |
if __name__ == '__main__': |
23 |
app.run(debug=True, host='0.0.0.0', port=5001) |