Skip to content

Commit a71ce97

Browse files
Update app.py
1 parent 66ac816 commit a71ce97

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

App/app.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ async def debug():
5151
@app.route("/")
5252
async def serve_index():
5353
return await send_from_directory(
54-
os.path.join(app.root_path, "frontend", "build"), "index.html"
54+
os.path.join(app.root_path, "static"), "index.html"
5555
)
5656

5757

5858
@app.route("/favicon.ico")
5959
async def favicon():
6060
return await send_from_directory(
61-
os.path.join(app.root_path, "frontend", "build"),
61+
os.path.join(app.root_path, "static"),
6262
"favicon.ico",
6363
mimetype="image/x-icon",
6464
)
@@ -67,13 +67,9 @@ async def favicon():
6767
# Serve static files (JS, CSS, images, etc.)
6868
@app.route("/static/<path:path>")
6969
async def static_files(path):
70-
static_path = os.path.join(STATIC_FOLDER, path)
71-
# Print/log the requested path
72-
logging.debug(f"Incoming request for static file: /static/{path}")
73-
logging.debug(f"Serving from: {static_path}")
74-
logging.info(f"Incoming request for static file: /static/{path}")
75-
logging.info(f"Serving from: {static_path}")
76-
return await send_from_directory("frontend/build/static/", path)
70+
return await send_from_directory(
71+
os.path.join(app.root_path, "static"), path
72+
)
7773

7874
USER_AGENT = "GitHubSampleWebApp/AsyncAzureOpenAI/1.0.0"
7975
# Load environment variables

0 commit comments

Comments
 (0)