Comparison

plugins/mod_httpserver.lua @ 1870:5b5e4a4ecb55

mod_httpserver: Update to use new httpserver.new_from_config syntax
author Matthew Wild <mwild1@gmail.com>
date Sat, 03 Oct 2009 00:57:26 +0100
parent 1816:1c0bde3db7d8
child 2355:08f02de5ab9d
child 2771:c9834f338a4e
comparison
equal deleted inserted replaced
1869:7456bb2a3458 1870:5b5e4a4ecb55
56 return serve_file(path); 56 return serve_file(path);
57 end 57 end
58 58
59 local ports = config.get(module.host, "core", "http_ports") or { 5280 }; 59 local ports = config.get(module.host, "core", "http_ports") or { 5280 };
60 httpserver.set_default_handler(handle_default_request); 60 httpserver.set_default_handler(handle_default_request);
61 httpserver.new_from_config(ports, "files", handle_file_request); 61 httpserver.new_from_config(ports, handle_file_request, { base = "files" });