Event-CRUD-Flask-python3-API/app.py
2024-01-07 11:24:22 +02:00

16 lines
354 B
Python

from flask import Flask
from models import db
from flask_migrate import Migrate
from routes import api
import config
app = Flask(__name__)
app.config.from_object(config.Config)
db.init_app(app)
migrate = Migrate(app, db)
app.register_blueprint(api)
if __name__ == '__main__':
with app.app_context():
db.create_all()
app.run(debug=True)