Skip to content

Commit

Permalink
fix(backend): startup functions
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotAmn committed Jan 16, 2025
1 parent ab2583e commit 289f8f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ def create_app():
load_auth_routes(flask_app)

# Serve React App
@app.route('/', defaults={'path': ''})
@app.route('/<path:path>')
@flask_app.route('/', defaults={'path': ''})
@flask_app.route('/<path:path>')
def serve(path):
if path != "" and os.path.exists(app.static_folder + '/' + path):
return send_from_directory(app.static_folder, path)
if path != "" and os.path.exists(flask_app.static_folder + '/' + path):
return send_from_directory(flask_app.static_folder, path)
else:
return send_from_directory(app.static_folder, 'index.html')
return send_from_directory(flask_app.static_folder, 'index.html')


CORS(flask_app)
Expand Down

0 comments on commit 289f8f4

Please sign in to comment.