Move view to view.html for easier routing in nginx
This commit is contained in:
parent
b753feaaeb
commit
02a07bf76a
|
@ -9,7 +9,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
@app.route('/view')
|
@app.route('/view')
|
||||||
def get_view():
|
def get_view():
|
||||||
return app.send_static_file('viewdata.html')
|
return app.send_static_file('view.html')
|
||||||
|
|
||||||
@app.route('/<path:path>')
|
@app.route('/<path:path>')
|
||||||
def get_file(path):
|
def get_file(path):
|
||||||
|
|
|
@ -10,7 +10,7 @@ server {
|
||||||
location / {
|
location / {
|
||||||
# First attempt to serve request as file
|
# First attempt to serve request as file
|
||||||
# If no such file, show index to allow for client side routing
|
# If no such file, show index to allow for client side routing
|
||||||
try_files $uri $uri/ @api;
|
try_files $uri $uri/ $uri.html @api;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @api {
|
location @api {
|
||||||
|
|
Loading…
Reference in New Issue