Extracted frontend from webservice to new directory
Updated directory structure Updated .gitignore
This commit is contained in:
52
api/config.py
Normal file
52
api/config.py
Normal file
@@ -0,0 +1,52 @@
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from scheme import BaseResponseSchema
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
class ConfigClass(object):
|
||||
""" Flask application config """
|
||||
|
||||
# Flask settings
|
||||
SECRET_KEY = os.getenv('SECRET_KEY')
|
||||
|
||||
# Flask-SQLAlchemy settings
|
||||
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://" + \
|
||||
os.getenv('MYSQL_USER') + ":" + \
|
||||
os.getenv('MYSQL_PASSWORD') + "@" + \
|
||||
os.getenv('MYSQL_HOST') + ":" + \
|
||||
(os.getenv("MYSQL_PORT") or str(3306)) + "/" + \
|
||||
os.getenv('MYSQL_DATABASE')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning
|
||||
|
||||
# openapi/Swagger config
|
||||
SPEC_FORMAT = 'yaml'
|
||||
SERVERS = [
|
||||
{
|
||||
"name": "Production",
|
||||
"url": "https://aktienbot.flokaiser.com"
|
||||
},
|
||||
{
|
||||
"name": "Local",
|
||||
"url": "http://127.0.0.1:5000"
|
||||
}
|
||||
]
|
||||
INFO = {
|
||||
'description': 'Webengineering 2 | Telegram Aktienbot',
|
||||
'version': '0.0.1'
|
||||
# 'termsOfService': 'http://example.com',
|
||||
# 'contact': {
|
||||
# 'name': 'API Support',
|
||||
# 'url': 'http://www.example.com/support',
|
||||
# 'email': 'support@example.com'
|
||||
# },
|
||||
# 'license': {
|
||||
# 'name': 'Apache 2.0',
|
||||
# 'url': 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||
# }
|
||||
}
|
||||
BASE_RESPONSE_DATA_KEY = "data"
|
||||
BASE_RESPONSE_SCHEMA = BaseResponseSchema
|
||||
Reference in New Issue
Block a user