I am just trying out Flask. I am trying to serve a different folder other than the one where the flask server started. This is what I have come up with.
alt_foler = '/folder/withindex/'
app = Flask('test')
@app.route('/')
@app.route('/<path:path>')
def redirect(path):
return alt_folder + path
But when I give 127.0.0.1/index.html, I just see
'/folder/withindex/index.html' instead of actually serving the index.html file located at the given location. How to set this correctly?