Update singlepageapplications.rst
This commit is contained in:
parent
fe4003b3c9
commit
b9abad28f7
1 changed files with 1 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ The following example demonstrates how to serve an SPA along with an API::
|
||||||
|
|
||||||
|
|
||||||
@app.route('/', defaults={'path': ''})
|
@app.route('/', defaults={'path': ''})
|
||||||
|
@app.route('/<string:path>')
|
||||||
@app.route('/<path:path>')
|
@app.route('/<path:path>')
|
||||||
def catch_all(path):
|
def catch_all(path):
|
||||||
return app.send_static_file("index.html")
|
return app.send_static_file("index.html")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue