diff options
Diffstat (limited to 'example/main.lua')
| -rw-r--r-- | example/main.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/example/main.lua b/example/main.lua index 335eaad..8cca405 100644 --- a/example/main.lua +++ b/example/main.lua @@ -90,8 +90,9 @@ luna.router.route("GET /request", function () return 200, {}, "Your IP is: " .. response.body end) --- serve static files from static/ directory -luna.router.static("GET /static/", "static/") +-- serve static files from static/ directory. also cache them on the client +-- side for 1 hour. +luna.router.static("GET /static/", "static/", "public, immutable, max-age=3600") -- register a custom eval handler that will evaluate whatever is passed into -- luna stdio when it's run with -D flag. in this case we print the result of |
