Mercurial Hosting > luan
comparison src/luan/host/Init.luan @ 1235:22228c12b6dd
fix luanhost thread logging
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 21 Apr 2018 21:54:23 -0600 |
parents | 3995cbe5b00a |
children | 3d29033de2bf |
comparison
equal
deleted
inserted
replaced
1234:7e7c2d0c3b99 | 1235:22228c12b6dd |
---|---|
1 local Luan = require "luan:Luan.luan" | 1 local Luan = require "luan:Luan.luan" |
2 local error = Luan.error | 2 local error = Luan.error |
3 local String = require "luan:String.luan" | 3 local String = require "luan:String.luan" |
4 local gsub = String.gsub or error() | 4 local gsub = String.gsub or error() |
5 local Io = require "luan:Io.luan" | |
6 local Http = require "luan:http/Http.luan" | |
7 local Hosting = require "luan:host/Hosting.luan" | |
8 local Mail = require "luan:mail/Mail.luan" | |
9 | 5 |
10 | 6 |
11 local Init = {} | 7 local Init = {} |
12 | 8 |
13 local dir, domain = ... | 9 local dir, domain = ... |
14 | |
15 Init.password = Luan.do_file(dir.."/info.luan").password or error() | |
16 | |
17 Http.dir = "file:"..dir.."/site" | |
18 | |
19 function Io.schemes.site(path,loading) | |
20 return Io.uri( Http.dir..path, loading ) | |
21 end | |
22 | |
23 Hosting.domain = domain | |
24 Io.password = Init.password | |
25 | 10 |
26 | 11 |
27 -- logging | 12 -- logging |
28 | 13 |
29 java() | 14 java() |
68 end | 53 end |
69 | 54 |
70 Init.logger_root = root.."." | 55 Init.logger_root = root.."." |
71 | 56 |
72 | 57 |
58 -- set vars | |
59 | |
60 local Io = require "luan:Io.luan" | |
61 local Http = require "luan:http/Http.luan" | |
62 local Hosting = require "luan:host/Hosting.luan" | |
63 local Mail = require "luan:mail/Mail.luan" | |
64 | |
65 Init.password = Luan.do_file(dir.."/info.luan").password or error() | |
66 | |
67 Http.dir = "file:"..dir.."/site" | |
68 | |
69 function Io.schemes.site(path,loading) | |
70 return Io.uri( Http.dir..path, loading ) | |
71 end | |
72 | |
73 Hosting.domain = domain | |
74 Io.password = Init.password | |
75 | |
76 | |
73 -- mail - fix later | 77 -- mail - fix later |
74 | 78 |
75 Hosting.send_mail = Mail.Sender{ | 79 Hosting.send_mail = Mail.Sender{ |
76 host = "smtpcorp.com"; | 80 host = "smtpcorp.com"; |
77 username = "smtp@luanhost.com"; -- ? | 81 username = "smtp@luanhost.com"; -- ? |