view mod_http_libjs/mod_http_libjs.lua @ 4089:ef752c5115f7

mod_muc_notifications: adapt to MUC get_name() API changes
author marc0s <marcos@tenak.net>
date Tue, 08 Sep 2020 12:35:51 +0200
parents 88a469b285f5
children 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 });
		}
	});