Mercurial Hosting > luan
changeset 1235:22228c12b6dd
fix luanhost thread logging
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 21 Apr 2018 21:54:23 -0600 |
parents | 7e7c2d0c3b99 |
children | 5b9856045e51 |
files | src/luan/host/Init.luan |
diffstat | 1 files changed, 19 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
diff -r 7e7c2d0c3b99 -r 22228c12b6dd src/luan/host/Init.luan --- a/src/luan/host/Init.luan Thu Apr 12 18:25:18 2018 -0600 +++ b/src/luan/host/Init.luan Sat Apr 21 21:54:23 2018 -0600 @@ -2,27 +2,12 @@ local error = Luan.error local String = require "luan:String.luan" local gsub = String.gsub or error() -local Io = require "luan:Io.luan" -local Http = require "luan:http/Http.luan" -local Hosting = require "luan:host/Hosting.luan" -local Mail = require "luan:mail/Mail.luan" local Init = {} local dir, domain = ... -Init.password = Luan.do_file(dir.."/info.luan").password or error() - -Http.dir = "file:"..dir.."/site" - -function Io.schemes.site(path,loading) - return Io.uri( Http.dir..path, loading ) -end - -Hosting.domain = domain -Io.password = Init.password - -- logging @@ -70,6 +55,25 @@ Init.logger_root = root.."." +-- set vars + +local Io = require "luan:Io.luan" +local Http = require "luan:http/Http.luan" +local Hosting = require "luan:host/Hosting.luan" +local Mail = require "luan:mail/Mail.luan" + +Init.password = Luan.do_file(dir.."/info.luan").password or error() + +Http.dir = "file:"..dir.."/site" + +function Io.schemes.site(path,loading) + return Io.uri( Http.dir..path, loading ) +end + +Hosting.domain = domain +Io.password = Init.password + + -- mail - fix later Hosting.send_mail = Mail.Sender{