(feat): Basic user auth

This commit is contained in:
Blake Ridgway 2024-12-17 14:23:38 -06:00
parent e5976d3c8d
commit de460fbcbc
6 changed files with 90 additions and 9 deletions

View file

@ -1,14 +1,23 @@
import os
from flask import Flask
from models import db, bcrypt
from routes.auth import auth_bp
from dotenv import load_dotenv
load_dotenv()
app = Flask(__name__)
@app.route('/')
def index():
return 'Index page'
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
@app.route('/login')
def login():
return 'Login Page'
db.init_app(app)
bcrypt.init_app(app)
if __name__ == "__main__":
app.run()
app.register_blueprint(auth_bp)
with app.app_context():
db.create_all()
if __name__ == '__main__':
app.run(debug=True)