Code from github to self hosted with git tea in AWS

This commit is contained in:
ADITYANAIR01
2026-03-20 12:01:02 +05:30
commit cf79af8f65
349 changed files with 4761 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
# === FILE: app/__init__.py ===
from flask import Flask, render_template
from app.config import Config
def create_app():
"""Flask application factory."""
app = Flask(__name__)
# Load configuration
app.config['SECRET_KEY'] = Config.FLASK_SECRET_KEY
app.config['SESSION_COOKIE_HTTPONLY'] = True
app.config['SESSION_COOKIE_SAMESITE'] = 'Lax'
# Initialize OAuth
from app.auth import init_oauth
init_oauth(app)
# Register blueprints
from app.auth import auth_bp
from app.files import files_bp
app.register_blueprint(auth_bp)
app.register_blueprint(files_bp)
# Root route - redirect to login page
@app.route('/')
def index():
return render_template('login.html')
# Error handlers
@app.errorhandler(404)
def not_found(e):
return render_template('login.html'), 404
@app.errorhandler(500)
def server_error(e):
return "Internal Server Error", 500
return app