-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
36 lines (29 loc) · 947 Bytes
/
Copy pathapp.py
File metadata and controls
36 lines (29 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from flask import Flask, render_template, request, redirect
from flask_cors import CORS
from config import PORT
from routes.auth_routes import auth_bp
from routes.job_routes import jobs_bp
from dashboard import create_dashboard
app = Flask(__name__)
CORS(app)
# Integrate Dash dashboard into Flask app
create_dashboard(app)
# Register blueprints
app.register_blueprint(auth_bp)
app.register_blueprint(jobs_bp)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/auth/callback')
def auth_callback():
"""Handle Supabase OAuth callback"""
# Supabase returns tokens in URL hash, handled by frontend
return render_template('callback.html')
@app.route('/health', methods=['GET'])
def health():
return {'status': 'ok'}, 200
if __name__ == '__main__':
import os
# Exclude workspaces from file watcher
extra_files = []
app.run(host='0.0.0.0', port=PORT, debug=True, use_reloader=False)