Mercurial Hosting > luan
comparison src/luan/host/init.luan @ 1626:cf9dfead83a3
use Config.postgres
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 07 Dec 2021 18:30:02 -0700 |
parents | f67f972bd648 |
children | 07be5015159d |
comparison
equal
deleted
inserted
replaced
1625:57c8baadb357 | 1626:cf9dfead83a3 |
---|---|
71 local Sql = require "luan:sql/Sql.luan" | 71 local Sql = require "luan:sql/Sql.luan" |
72 local database = Sql.database or error() | 72 local database = Sql.database or error() |
73 local Logging = require "luan:logging/Logging.luan" | 73 local Logging = require "luan:logging/Logging.luan" |
74 local logger = Logging.logger "init" | 74 local logger = Logging.logger "init" |
75 | 75 |
76 local pg = Package.load("file:postgres.luan") | 76 local Config = require "file:Config.luan" |
77 Config.password = nil -- security | |
78 local pg = Config.postgres | |
77 | 79 |
78 function Hosted.postgres_spec() | 80 function Hosted.postgres_spec() |
79 if pg == false then | 81 if pg == nil then |
80 return nil | 82 return nil |
81 end | 83 end |
82 local spec = { | 84 local spec = { |
83 class = "org.postgresql.Driver" | 85 class = "org.postgresql.Driver" |
84 url = "jdbc:postgresql://localhost:5432/"..domain | 86 url = "jdbc:postgresql://localhost:5432/"..domain |