2019-10-04 22:00:47 +00:00
|
|
|
import os
|
2019-10-04 18:24:11 +00:00
|
|
|
# local db
|
2019-10-12 05:23:38 +00:00
|
|
|
# ! Environment Variable
|
2019-10-04 18:24:11 +00:00
|
|
|
DATABASE = 'postgresql://localhost/browser-go'
|
|
|
|
|
|
|
|
class BaseConfig:
|
|
|
|
"""Base configuration."""
|
|
|
|
SECRET_KEY = os.getenv('SECRET_KEY')
|
|
|
|
DEBUG = False
|
|
|
|
BCRYPT_LOG_ROUNDS = 13
|
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
|
|
|
|
|
|
|
class DevelopmentConfig(BaseConfig):
|
|
|
|
"""Development configuration."""
|
|
|
|
DEBUG = True
|
|
|
|
BCRYPT_LOG_ROUNDS = 4
|
|
|
|
SQLALCHEMY_DATABASE_URI = DATABASE
|
2019-10-07 20:55:43 +00:00
|
|
|
PORT = 5000
|
2019-10-04 18:24:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestingConfig(BaseConfig):
|
|
|
|
"""Testing configuration."""
|
|
|
|
DEBUG = True
|
|
|
|
TESTING = True
|
|
|
|
BCRYPT_LOG_ROUNDS = 4
|
|
|
|
SQLALCHEMY_DATABASE_URI = DATABASE
|
|
|
|
PRESERVE_CONTEXT_ON_EXCEPTION = False
|
|
|
|
|
|
|
|
|
|
|
|
class ProductionConfig(BaseConfig):
|
|
|
|
"""Production configuration."""
|
2019-10-12 18:07:24 +00:00
|
|
|
SECRET_KEY = os.getenv('SECRET_KEY')
|
2019-10-04 18:24:11 +00:00
|
|
|
DEBUG = False
|
2019-10-12 17:54:23 +00:00
|
|
|
SQLALCHEMY_DATABASE_URI = 'postgres://mzwaocmnwvesac:d86d256a9e73639d0ac1eba3651f3f5268540e6417b110265fd58398358d1c1b@ec2-174-129-227-51.compute-1.amazonaws.com:5432/d1jbr1uiojpma'
|