Mercurial Hosting > luan
changeset 1710:fc224a1bb6ea
add blog/serve_and_backup.luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 10 Jul 2022 17:52:19 -0600 |
parents | 6378d261136e |
children | 05d14db623b6 |
files | examples/blog/serve_and_backup.luan examples/blog/src/lib/Db.luan |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
diff -r 6378d261136e -r fc224a1bb6ea examples/blog/serve_and_backup.luan --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/blog/serve_and_backup.luan Sun Jul 10 17:52:19 2022 -0600 @@ -0,0 +1,6 @@ +require "java" +local BackupIndexWriter = require "java:goodjava.lucene.backup.BackupIndexWriter" +BackupIndexWriter.backupDomains = {"localhost"} + +local Server = require "luan:http/Server.luan" +Server.serve("src")
diff -r 6378d261136e -r fc224a1bb6ea examples/blog/src/lib/Db.luan --- a/examples/blog/src/lib/Db.luan Tue Jul 05 13:37:05 2022 +0300 +++ b/examples/blog/src/lib/Db.luan Sun Jul 10 17:52:19 2022 -0600 @@ -11,12 +11,6 @@ local logger = Logging.logger "Db" -if not Hosted.is_hosted then - require "java" - local BackupIndexWriter = require "java:goodjava.lucene.backup.BackupIndexWriter" - BackupIndexWriter.backupDomains = {"localhost"} -end - local dir = uri("site:/private/local/lucene") local Db = Lucene.index( dir, { default_type = Lucene.type.english