university-final-iot-backend/config.py

35 lines
943 B
Python
Raw Normal View History

2018-04-25 14:02:29 +00:00
# App configuration
DEBUG = False
# Define the application directory
import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
# Define the database - we are working with
SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL']
2018-04-27 08:47:24 +00:00
SQLALCHEMY_TRACK_MODIFICATIONS = False
2018-04-26 12:51:37 +00:00
DATABASE_CONNECT_OPTIONS = {}
# Application threads. A common general assumption is
# using 2 per available processor cores - to handle
# incoming requests using one and performing background
# operations using the other.
THREADS_PER_PAGE = 2
# Enable protection agains *Cross-site Request Forgery (CSRF)*
CSRF_ENABLED = True
# Use a secure, unique and absolutely secret key for
# signing the data.
CSRF_SESSION_KEY = "secret"
# Secret key for signing cookies
SECRET_KEY = "secret"
2018-04-25 14:02:29 +00:00
# MQTT configuration
2018-05-03 18:56:48 +00:00
MQTT_BROKER_URL = 'broker.hivemq.com'
MQTT_BROKER_PORT = 1883
MQTT_USERNAME = 'user'
MQTT_PASSWORD = 'secret'
MQTT_REFRESH_TIME = 1.0 # refresh time in seconds