comparison src/luan/host/Util.luan @ 1627:07be5015159d

better config
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 07 Dec 2021 22:15:16 -0700
parents cf9dfead83a3
children 5c676385284b
comparison
equal deleted inserted replaced
1626:cf9dfead83a3 1627:07be5015159d
32 local file = Io.schemes.file(dir.."/info.luan") 32 local file = Io.schemes.file(dir.."/info.luan")
33 file.delete() 33 file.delete()
34 file.write_text("return "..stringify{password=password}.."\n") 34 file.write_text("return "..stringify{password=password}.."\n")
35 end 35 end
36 36
37 local Config = require "file:Config.luan" 37 require "java"
38 local pg_admin = Config.postgres 38 local WebHandler = require "java:luan.host.WebHandler"
39 local pg_admin = WebHandler.config.postgres
39 40
40 function Util.set_postgres_password(domain,password) 41 function Util.set_postgres_password(domain,password)
41 if pg_admin == nil then 42 if pg_admin == nil then
42 return 43 return
43 end 44 end