diff examples/blog/src/lib/test.luan @ 1220:4721c482c86b

cleaner Db example
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 21 Mar 2018 15:54:57 -0600
parents a50803fde972
children 4416b9cbebf9
line wrap: on
line diff
--- a/examples/blog/src/lib/test.luan	Wed Mar 21 15:36:54 2018 -0600
+++ b/examples/blog/src/lib/test.luan	Wed Mar 21 15:54:57 2018 -0600
@@ -10,13 +10,9 @@
 local String = require "luan:String.luan"
 local matches = String.matches or error()
 
-Http.uncache_site()
-
-local Db_mod = require "site:/lib/Db_mod.luan"
-
-Db_mod.lucene_dir = "site:/private/local/lucene_test"
 local Db = require "site:/lib/Db.luan"
-Db.delete_all()
+Db.db = Db.new_db("site:/private/local/lucene_test")
+Db.db.delete_all()
 
 local Post = require "site:/lib/Post.luan"
 local page