author | Matthew Wild <mwild1@gmail.com> |
Sat, 23 Jan 2021 12:56:17 +0000 | |
changeset 4381 | a0f1fb5e7829 |
parent 4099 | de2390d6bbe4 |
child 4608 | f0efbb0b0b5b |
permissions | -rw-r--r-- |
local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css", js = "application/javascript", }; local serve; if not pcall(function () local http_files = require "net.http.files"; serve = http_files.serve; end) then serve = module:depends"http_files".serve; end local libjs_path = module:get_option_string("libjs_path", "/usr/share/javascript"); module:provides("http", { default_path = "/share"; route = { ["GET /*"] = serve({ path = libjs_path, mime_map = mime_map }); } });