add wsgi server
This commit is contained in:
@@ -9,7 +9,12 @@ from .homescreen import homescreen
|
|||||||
from .mainapp import mainapp
|
from .mainapp import mainapp
|
||||||
|
|
||||||
|
|
||||||
def create_app(test_config=None):
|
def create_app(*args):
|
||||||
|
print()
|
||||||
|
print(arg)
|
||||||
|
print()
|
||||||
|
print(type(arg))
|
||||||
|
print()
|
||||||
# create and configure the app
|
# create and configure the app
|
||||||
app = Flask(__name__, instance_relative_config=True)
|
app = Flask(__name__, instance_relative_config=True)
|
||||||
|
|
||||||
@@ -23,12 +28,7 @@ def create_app(test_config=None):
|
|||||||
DATABASE=instance_path / "flaskr.sqlite",
|
DATABASE=instance_path / "flaskr.sqlite",
|
||||||
)
|
)
|
||||||
|
|
||||||
if test_config is None:
|
app.config.from_pyfile("config.py", silent=True)
|
||||||
# load the instance config, if it exists, when not testing
|
|
||||||
app.config.from_pyfile("config.py", silent=True)
|
|
||||||
else:
|
|
||||||
# load the test config if passed in
|
|
||||||
app.config.from_mapping(test_config)
|
|
||||||
|
|
||||||
for blueprint in (homescreen, mainapp):
|
for blueprint in (homescreen, mainapp):
|
||||||
app.register_blueprint(blueprint)
|
app.register_blueprint(blueprint)
|
||||||
|
|||||||
Reference in New Issue
Block a user