feat: remove /error route
This commit is contained in:
parent
d0752c8ec7
commit
7926535685
1 changed files with 1 additions and 7 deletions
8
web.py
8
web.py
|
@ -30,16 +30,10 @@ def dist(path):
|
||||||
else:
|
else:
|
||||||
return send_from_directory('dist', path + '/index.html')
|
return send_from_directory('dist', path + '/index.html')
|
||||||
|
|
||||||
@app.route('/error')
|
|
||||||
def errorthing():
|
|
||||||
1/0
|
|
||||||
return 'hello'
|
|
||||||
|
|
||||||
@app.errorhandler(404)
|
@app.errorhandler(404)
|
||||||
def not_found(e):
|
def not_found(e):
|
||||||
return send_from_directory('dist', '404.html'), 404
|
return send_from_directory('dist', '404.html'), 404
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host='0.0.0.0')
|
app.run(host='0.0.0.0')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue