Youssouf ⚜️ commited on
Commit
7192e80
·
1 Parent(s): ed98528

fix: add root route to serve index.html

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -7,7 +7,13 @@ import time
7
  from flask import Flask, request, jsonify, send_file
8
  from yt_dlp import YoutubeDL
9
 
10
- app = Flask(__name__)
 
 
 
 
 
 
11
 
12
  TASKS_DIR = "tasks"
13
  if not os.path.exists(TASKS_DIR):
 
7
  from flask import Flask, request, jsonify, send_file
8
  from yt_dlp import YoutubeDL
9
 
10
+ app = Flask(__name__, static_folder=".", static_url_path="")
11
+
12
+
13
+ @app.route("/")
14
+ def index():
15
+ return app.send_static_file("index.html")
16
+
17
 
18
  TASKS_DIR = "tasks"
19
  if not os.path.exists(TASKS_DIR):