Mercurial Hosting > nabble
changeset 18:862b1ef23e75
add setup.sh
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 02 Feb 2020 09:04:59 -0700 |
parents | c9bbcebcf359 |
children | 18cf4872fd7f |
files | conf/Init.luan conf/setup.luan setup.sh |
diffstat | 3 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/conf/Init.luan Thu Jan 09 11:28:37 2020 +0300 +++ b/conf/Init.luan Sun Feb 02 09:04:59 2020 -0700 @@ -79,6 +79,9 @@ end end +local Server = require "java:global.Server" +Server.add("local","jdbc:postgresql://localhost:5432/nabble","administrator","","me.nabble.com"); + function Init.add_filters(context) end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/setup.luan Sun Feb 02 09:04:59 2020 -0700 @@ -0,0 +1,13 @@ +java() +local Luan = require "luan:Luan.luan" +local error = Luan.error +local LoggerFactory = require "java:org.slf4j.LoggerFactory" +local Log4j = require "java:nabble.utils.Log4j" +local Init = require "file:conf/Init.luan" + +Log4j.initForConsole() +local logger = LoggerFactory.getLogger("serve_nabble"); + +local DbGlobalUpdater = require "java:nabble.model.DbGlobalUpdater" +DbGlobalUpdater.updateGlobal() +logger.info "db update done"