Mercurial Hosting > luan
diff src/luan/host/init.luan @ 1418:732b5de211fc
add Hosted.luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 18 Oct 2019 22:29:46 -0600 |
parents | db57d562c4bd |
children | 94a6a209d4e2 |
line wrap: on
line diff
--- a/src/luan/host/init.luan Fri Oct 18 19:38:08 2019 -0600 +++ b/src/luan/host/init.luan Fri Oct 18 22:29:46 2019 -0600 @@ -41,7 +41,7 @@ local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" -local Hosting = require "luan:host/Hosting.luan" +local Hosted = require "luan:host/Hosted.luan" local Mail = require "luan:mail/Mail.luan" Io.password = do_file(dir.."/info.luan").password or error() @@ -54,19 +54,7 @@ end Http.domain = domain -Http.is_hosted = true - - --- mail - fix later - -Hosting.send_mail = Mail.Sender{ - host = "smtpcorp.com" - username = "smtp@luan.ws" -- ? - password = "luanhost" - port = 2525 -}.send - - +Hosted.is_hosted = true -- postgres @@ -79,7 +67,7 @@ local fn = Luan.load_file("file:postgres.luan") or error() local pg = fn() -function Hosting.postgres_spec() +function Hosted.postgres_spec() if pg == nil then return nil end @@ -101,19 +89,15 @@ end - - - -- callback to luanhost code do_file "file:init.luan" - require "java" local WebHandler = require "java:luan.host.WebHandler" local LuanJava = require "java:luan.Luan" -function Hosting.no_security(password) +function Hosted.no_security(password) WebHandler.securityPassword == password or error "wrong password" LuanJava.setSecurity(nil) end