added rest-API, sqlalchemy and nice structure

This commit is contained in:
2019-03-06 16:36:57 +01:00
commit 38ab1578b0
9 changed files with 422 additions and 0 deletions

17
__init__.py Normal file
View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
import os
from flask import Flask
from flask_httpauth import HTTPTokenAuth, HTTPBasicAuth
from flask_sqlalchemy import SQLAlchemy
from .serve_frontend import fe_bp
from .api import api_bp
jwt_auth = HTTPTokenAuth('Bearer')
basic_auth = HTTPBasicAuth()
app = Flask(__name__)
app.register_blueprint(api_bp)
app.register_blueprint(fe_bp)
db = SQLAlchemy(app)