Mercurial Hosting > luan
changeset 250:2b6f51d7af40
add Web_server.config_server()
git-svn-id: https://luan-java.googlecode.com/svn/trunk@251 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 17 Oct 2014 02:17:46 +0000 |
parents | 9737ebb9aaa0 |
children | 705d14f4d8ee |
files | dist/jars/luan-core-trunk.jar dist/jars/luan-logging-trunk.jar dist/jars/luan-lucene-trunk.jar dist/jars/luan-mail-trunk.jar dist/jars/luan-web-trunk.jar web/src/luan/modules/web/Web_server.luan |
diffstat | 6 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/web/src/luan/modules/web/Web_server.luan Fri Oct 17 00:55:15 2014 +0000 +++ b/web/src/luan/modules/web/Web_server.luan Fri Oct 17 02:17:46 2014 +0000 @@ -65,7 +65,10 @@ local hc = HandlerCollection.new() hc.setHandlers { SessionHandler.new(), handler_wrapper, DefaultHandler.new(), log_handler } - + +-- override to config server +function config_server(server) +end function serve(dir) dir = dir.gsub("/$","") -- remove trailing '/' if any @@ -81,5 +84,6 @@ luan_handler.setWelcomeFile(welcome_file) local server = Server.new(port) server.setHandler(hc); + config_server(server) server.start() end