INNER CODE UNIT · Python
redir
HendrikStrobelt/detecting-fake-text · server.py:55
def redir():
return redirect('client/index.html')
@app.route('/client/<path:path>')
def send_static(path):
""" serves all files from ./client/ to ``/client/<path:path>``
:param path: path from api call
"""
return send_from_directory('client/dist/', path)
@app.route('/data/<path:path>')
def send_data(path):
""" serves all files from the data dir to ``/data/<path:path>``
:param path: path from api call