Software /
code /
prosody-modules
File
mod_http_libjs/mod_http_libjs.lua @ 4091:354dc1e7977a
mod_register_apps: Provides a configurable list of XMPP apps
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 10 Sep 2020 16:47:59 +0100 |
parent | 4087:88a469b285f5 |
child | 4095:de2390d6bbe4 |
line wrap: on
line source
local mime_map = module:shared("/*/http_files/mime").types or { css = "text/css", js = "application/javascript", }; local libjs_path = module:get_option_string("libjs_path", "/usr/share/javascript"); module:provides("http", { default_path = "/share"; route = { ["GET /*"] = require "net.http.files".serve({ path = libjs_path, mime_map = mime_map }); } });