luniebox/application/app.py

20 lines
465 B
Python
Raw Normal View History

2022-02-06 10:19:03 +01:00
import sys
from flask import Flask
import logging
from luniebox import luniebox
from api import api
from pages import pages
app = Flask(__name__)
app.register_blueprint(api, url_prefix='/api')
app.register_blueprint(pages)
if __name__ != '__main__':
gunicorn_logger = logging.getLogger('gunicorn.error')
app.logger.handlers = gunicorn_logger.handlers
app.logger.setLevel(gunicorn_logger.level)
if __name__ == "__main__":
app.run(host='0.0.0.0')