hanze/muizenval

server/app.py in master
Repositories | Summary | Log | Files

app.py (847B) download


 1from flask import Flask
 2from flask_bcrypt import Bcrypt
 3from flask_login import LoginManager
 4from flask_sqlalchemy import SQLAlchemy
 5from flask_socketio import SocketIO
 6
 7domain = 'muizenval.tk'
 8
 9app = Flask(__name__)
10app.config['SECRET_KEY'] = 'iot_project'
11app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
12app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
13db = SQLAlchemy(app)
14bcrypt = Bcrypt(app)
15socket = SocketIO(app, logger=True)
16login_manager = LoginManager(app)
17login_manager.login_view = 'login'
18login_manager.login_message_category = 'info'
19#sslify = SSLify(app)
20#ssl_files = ('ssl/public.crt', 'ssl/private.key')
21
22# to run 'routes.py' and make the routes available
23# '#noqa' is nessesary for my formatter to not put them to the top!
24from .models import *  # noqa
25from .routes import *  # noqa
26from .socket import *  # noqa