sdi-checker/sdi_checker/sdi_checker_web.py
Guillaume RYCKELYNCK c6c2ee9c04 first commit
2024-06-22 22:00:42 +02:00

21 lines
478 B
Python

import os
from sdi_checker import config
from sdi_checker.app_web.application import ApplicationWeb
def run(mode='dev'):
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
CONFIG_FILE = os.path.join(ROOT_DIR, config.__config_file__)
app = ApplicationWeb(config_file=CONFIG_FILE, mode=mode)
if mode == 'wsgi':
return app.run()
app.run()
if __name__ == "__main__":
mode = sys.argv[1] if len(sys.argv) > 1 else 'dev'
run(mode)