python-gallery/run.py

33 lines
716 B
Python
Raw Normal View History

2023-03-11 23:16:27 +00:00
print("""
___ _ _
/ _ \ _ __ | |_ _| | ___ __ _ ___
| | | | '_ \| | | | | | / _ \/ _` / __|
| |_| | | | | | |_| | |__| __/ (_| \__ \
\___/|_| |_|_|\__, |_____\___|\__, |___/
|___/ |___/
Created by Fluffy Bean - Version 23.03.12
2023-03-11 23:16:27 +00:00
""")
from setup.args import PORT, ADDRESS, WORKERS, DEBUG
from setup.configuration import Configuration
2023-03-11 23:16:27 +00:00
2023-03-12 15:08:49 +00:00
Configuration() # Run prechecks
2023-03-11 23:16:27 +00:00
if DEBUG:
2023-03-11 23:16:27 +00:00
from gallery import create_app
2023-03-12 15:08:49 +00:00
create_app().run(host=ADDRESS, port=PORT, debug=True, threaded=True)
2023-03-11 23:16:27 +00:00
else:
2023-03-12 15:08:49 +00:00
from setup.runner import OnlyLegs
options = {
'bind': f'{ADDRESS}:{PORT}',
'workers': WORKERS,
}
OnlyLegs(options).run()
2023-03-11 23:16:27 +00:00