Comparison

mod_welcome_page/mod_welcome_page.lua @ 4193:8d1e996034ee

mod_welcome_page: Serve from top level path (/) by default
author Kim Alvefur <zash@zash.se>
date Mon, 12 Oct 2020 18:45:01 +0200
parent 4184:9127fa98ee1e
child 4605:ffb709728210
comparison
equal deleted inserted replaced
4192:1be37846314a 4193:8d1e996034ee
61 end 61 end
62 62
63 local http_files = module:depends("http_files"); 63 local http_files = module:depends("http_files");
64 64
65 module:provides("http", { 65 module:provides("http", {
66 default_path = "/";
66 route = { 67 route = {
67 ["GET"] = serve_page; 68 ["GET"] = serve_page;
68 ["GET /*"] = http_files.serve({ path = template_path }); 69 ["GET /*"] = http_files.serve({ path = template_path });
69 ["POST"] = handle_submit; 70 ["POST"] = handle_submit;
70 }; 71 };