<reponame>ian-quinn/kitchenware
from datetime import timedelta
import json
import os

config = json.load(open(os.environ.get('CONFIG_FILE', './config/config.json')))

class Config(object):
    ENV = config['flask'].get('env', 'production')
    DEBUG = config['flask'].get('debug', False)

    SECRET_KEY = config['flask'].get('oauth_secret', False)
    
    SQLALCHEMY_DATABASE_URI = config['database'].get('URL', False)
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    # JWT_SECRET_KEY = config['flask'].get('jwt_secret', False)
    # JWT_ACCESS_TOKEN_EXPIRES = timedelta(seconds=config['flask'].get('jwt_expiration', 900))
    # JWT_BLACKLIST_ENABLED = True
    # JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh']

    # RESTFUL_JSON = {'separators': (', ', ': '),
    #                 'indent': 2,
    #                 'cls': DateTimeEncoder}


flask_config = Config

from datetime import timedelta
import json
import os

config = json.load(open(os.environ.get('CONFIG_FILE', './config/config.json')))

class Config(object):
    ENV = config['flask'].get('env', 'production')
    DEBUG = config['flask'].get('debug', False)

    SECRET_KEY = config['flask'].get('oauth_secret', False)
    
    SQLALCHEMY_DATABASE_URI = config['database'].get('URL', False)
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    # JWT_SECRET_KEY = config['flask'].get('jwt_secret', False)
    # JWT_ACCESS_TOKEN_EXPIRES = timedelta(seconds=config['flask'].get('jwt_expiration', 900))
    # JWT_BLACKLIST_ENABLED = True
    # JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh']

    # RESTFUL_JSON = {'separators': (', ', ': '),
    #                 'indent': 2,
    #                 'cls': DateTimeEncoder}


flask_config = Config
# JWT_SECRET_KEY = config['flask'].get('jwt_secret', False) # JWT_ACCESS_TOKEN_EXPIRES = timedelta(seconds=config['flask'].get('jwt_expiration', 900)) # JWT_BLACKLIST_ENABLED = True # JWT_BLACKLIST_TOKEN_CHECKS = ['access', 'refresh'] # RESTFUL_JSON = {'separators': (', ', ': '), #                 'indent': 2, #                 'cls': DateTimeEncoder}