Reorganize repos
This commit is contained in:
28
wsgi.py
Normal file
28
wsgi.py
Normal file
@ -0,0 +1,28 @@
|
||||
from app import create_app
|
||||
from app import lib
|
||||
from app import models
|
||||
import logging
|
||||
import logging.config
|
||||
import os
|
||||
|
||||
logconffile = os.path.join('app/logging', '%s.ini' %
|
||||
os.environ.get('FLASK_ENV', 'development'))
|
||||
logging.config.fileConfig(logconffile, disable_existing_loggers=True)
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
app = create_app()
|
||||
|
||||
log.debug(f"Running in web mode: {lib.webMode()}")
|
||||
|
||||
|
||||
@app.shell_context_processor
|
||||
def get_context():
|
||||
# flask cli context setup
|
||||
"""Objects exposed here will be automatically available from the shell."""
|
||||
return dict(app=app, models=models)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
log.info("direct run")
|
||||
app.run()
|
Reference in New Issue
Block a user