Files
Hasscall/app/__init__.py
T
2022-12-10 16:55:34 +01:00

27 lines
524 B
Python

# Import core packages
import logging
import os
# Import Flask
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
# Inject Flask magic
webapp = Flask(__name__)
# Load configuration
webapp.config.from_object('app.config.Config')
# Construct the DB Object (SQLAlchemy interface)
db = SQLAlchemy(webapp)
# Explicitly import all tables
from app.models import *
# Import routing to render the pages
from app.views import *
with webapp.app_context():
db.create_all()
webapp.run(host="0.0.0.0", port=5000)