Initial Release - v1.0.0

This commit is contained in:
Adi Chirilov
2020-08-21 11:54:03 +03:00
parent e3e8c2db6e
commit 8295e32fc2
238 changed files with 42591 additions and 1 deletions

32
run.py Normal file
View File

@ -0,0 +1,32 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from flask_migrate import Migrate
from os import environ
from sys import exit
from decouple import config
from config import config_dict
from app import create_app, db
# WARNING: Don't run with debug turned on in production!
DEBUG = config('DEBUG', default=True)
# The configuration
get_config_mode = 'Debug' if DEBUG else 'Production'
try:
# Load the configuration using the default values
app_config = config_dict[get_config_mode.capitalize()]
except KeyError:
exit('Error: Invalid <config_mode>. Expected values [Debug, Production] ')
app = create_app( app_config )
Migrate(app, db)
if __name__ == "__main__":
app.run()