comparison web/src/luan/modules/web/Server.luan @ 462:2e79b47d02a2

remove all command line options; add add_extension boolean arg to scheme fns;
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 06 May 2015 16:54:20 -0600
parents 5b36f663a1b8
children 55a86fc4701b
comparison
equal deleted inserted replaced
461:e12841f7edef 462:2e79b47d02a2
70 70
71 71
72 function init(dir) 72 function init(dir)
73 dir = dir.gsub("/$","") -- remove trailing '/' if any 73 dir = dir.gsub("/$","") -- remove trailing '/' if any
74 Http.dir = dir 74 Http.dir = dir
75 function Io.schemes.site(path) 75 function Io.schemes.site(path,add_extension)
76 return Io.uri( dir..path ) 76 return Io.uri( dir..path, add_extension )
77 end 77 end
78 authentication_handler.setPassword(private_password) 78 authentication_handler.setPassword(private_password)
79 local base = dir 79 local base = dir
80 if base.match("^classpath:") ~= nil then 80 if base.match("^classpath:") ~= nil then
81 base = dir.."#"..welcome_file.."#"..welcome_file..".luan" 81 base = dir.."#"..welcome_file.."#"..welcome_file..".luan"