comparison src/luan/modules/http/Server.luan @ 1424:9ab267b9427c

better load_file()
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 22 Nov 2019 22:58:39 -0700
parents 4abf88ec66de
children d9a5405a3102
comparison
equal deleted inserted replaced
1423:2c06a7ff4173 1424:9ab267b9427c
36 end 36 end
37 dir = gsub(dir,"/$","") -- remove trailing '/' if any 37 dir = gsub(dir,"/$","") -- remove trailing '/' if any
38 Http.dir = dir 38 Http.dir = dir
39 Http.is_serving = true 39 Http.is_serving = true
40 function Io.schemes.site(path) 40 function Io.schemes.site(path)
41 return uri( dir..path ) 41 local u = uri( dir..path )
42 u.uri_string = "site:"..path
43 return u
42 end 44 end
43 end 45 end
44 46
45 function Server.start(server) 47 function Server.start(server)
46 try { 48 try {