Mercurial Hosting > luan
comparison src/luan/host/main.luan @ 1418:732b5de211fc
add Hosted.luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 18 Oct 2019 22:29:46 -0600 |
parents | 5b8f76e26ab7 |
children | e48290f3d9fb |
comparison
equal
deleted
inserted
replaced
1417:c7f9dd062eda | 1418:732b5de211fc |
---|---|
9 local Thread = require "luan:Thread.luan" | 9 local Thread = require "luan:Thread.luan" |
10 local String = require "luan:String.luan" | 10 local String = require "luan:String.luan" |
11 local literal = String.literal or error() | 11 local literal = String.literal or error() |
12 local lower = String.lower or error() | 12 local lower = String.lower or error() |
13 local matches = String.matches or error() | 13 local matches = String.matches or error() |
14 local Hosting = require "luan:host/Hosting.luan" | 14 local Hosted = require "luan:host/Hosted.luan" |
15 local Logging = require "luan:logging/Logging.luan" | 15 local Logging = require "luan:logging/Logging.luan" |
16 local logger = Logging.logger "main" | 16 local logger = Logging.logger "main" |
17 local WebHandler = Hosting.WebHandler or error() | 17 local WebHandler = Hosted.WebHandler or error() |
18 local Util = require "classpath:luan/host/Util.luan" | 18 local Util = require "classpath:luan/host/Util.luan" |
19 local read_password = Util.read_password or error() | 19 local read_password = Util.read_password or error() |
20 local set_password = Util.set_password or error() | 20 local set_password = Util.set_password or error() |
21 local set_postgres_password = Util.set_postgres_password or error() | 21 local set_postgres_password = Util.set_postgres_password or error() |
22 local check_postgres_password = Util.check_postgres_password or error() | 22 local check_postgres_password = Util.check_postgres_password or error() |
23 | 23 |
24 | 24 |
25 local sites_dir = Io.schemes.file(Hosting.sites_dir) | 25 local sites_dir = Io.schemes.file(Hosted.sites_dir) |
26 | 26 |
27 sites_dir.mkdir() | 27 sites_dir.mkdir() |
28 | 28 |
29 local function delete_unused(file) | 29 local function delete_unused(file) |
30 if file.is_directory() then | 30 if file.is_directory() then |