Reverse static arguments

This commit is contained in:
Channel Cat
2016-10-25 02:45:28 -07:00
parent ee70f1e55e
commit 74ae0007d3
8 changed files with 17 additions and 14 deletions

View File

@@ -8,11 +8,11 @@ Both directories and files can be served by registering with static
app = Sanic(__name__)
# Serves files from the static folder to the URL /static
app.static('./static', '/static')
app.static('/static', './static')
# Serves the file /home/ubuntu/test.png when the URL /the_best.png
# is requested
app.static('/home/ubuntu/test.png', '/the_best.png')
app.static('/the_best.png', '/home/ubuntu/test.png')
app.run(host="0.0.0.0", port=8000)
```