18 lines
366 B
Python
18 lines
366 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
from flask import Flask
|
|
from flask_sqlalchemy import SQLAlchemy
|
|
from routes import register_route
|
|
|
|
load_dotenv()
|
|
|
|
db = SQLAlchemy()
|
|
app = Flask(__name__)
|
|
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv("SQLALCHEMY_DATABASE_URI")
|
|
db.init_app(app)
|
|
|
|
register_route(app, db)
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=True)
|