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, os |
7 |
|
8 |
# Get the path to the base directory of the app |
9 |
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__))) |
10 |
|
11 |
# append the path to the WSGI env path |
12 |
sys.path.insert(0, BASE_DIR) |
13 |
|
14 |
# Import and create the app |
15 |
from swtstore import create_app |
16 |
|
17 |
app = create_app() |
18 |
|
19 |
# Run the server if this script is directly executed |
20 |
# Presumably, this is development mode |
21 |
if __name__ == '__main__': |
22 |
app.run(host='0.0.0.0', port=5001) |