2019-10-04 22:00:47 +00:00
|
|
|
import os
|
2019-10-04 18:24:11 +00:00
|
|
|
# local db
|
|
|
|
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."""
|
|
|
|
SECRET_KEY = ''
|
|
|
|
DEBUG = False
|
|
|
|
SQLALCHEMY_DATABASE_URI = 'postgresql:///'
|