oshipka/bootstrap/run.py

18 lines
499 B
Python
Raw Normal View History

2021-10-25 08:38:17 +02:00
from config import TEMPLATES_FOLDER, STATIC_FOLDER, APP_BASE_URL, PORT
2020-06-04 15:24:18 +02:00
from oshipka.persistance import populate_static, init_db
2020-03-18 12:32:40 +01:00
from populate import populate_db
from webapp.app import app
2020-03-23 14:59:11 +01:00
if init_db(app):
2020-05-05 15:50:35 +02:00
populate_static(app)
2020-03-23 14:59:11 +01:00
populate_db(app)
2020-03-18 12:32:40 +01:00
2020-03-23 14:59:11 +01:00
app.template_folder = TEMPLATES_FOLDER
2020-03-25 16:23:24 +01:00
app.static_folder = STATIC_FOLDER
2020-03-18 12:32:40 +01:00
2020-03-23 14:59:11 +01:00
if __name__ == "__main__":
2021-10-25 08:38:17 +02:00
print("Running on {}".format(APP_BASE_URL))
app.run(port=PORT, debug=True, ssl_context=('webapp/ssl/cert.crt', 'webapp/ssl/cert.key'))