feat: handle error 404

This commit is contained in:
Ayo Ayco 2024-04-09 13:36:54 +02:00
parent 35b07cefa4
commit ec771521f5

5
web.py
View file

@ -12,5 +12,10 @@ def dist(path):
else:
return send_from_directory('dist', path + '/index.html')
@app.errorhandler(404)
def not_found(e):
return send_from_directory('dist', '404.html')
if __name__ == '__main__':
app.run(host='0.0.0.0')