Mercurial Hosting > luan
annotate blog/src/private/tools/test.luan @ 612:bb9a790d8401
Added tag 0.14 for changeset 8bd98da6991a
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 13 Dec 2015 17:44:58 -0700 |
parents | e930f92d0f61 |
children | ca169567ce07 |
rev | line source |
---|---|
598 | 1 local Luan = require "luan:Luan" |
2 local do_file = Luan.do_file | |
3 local try = Luan.try | |
4 local Io = require "luan:Io" | |
5 local print = Io.print | |
6 local Http = require "luan:http/Http" | |
7 | |
8 | |
9 return function() | |
10 Io.stdout = Http.response.text_writer() | |
11 Http.response.content_type = "text/plain" | |
12 try { | |
13 function() | |
14 do_file "site:/lib/test.luan" | |
15 end; | |
16 catch = function(e) | |
17 print() | |
18 print("error:",e) | |
19 end; | |
20 } | |
21 local Db = require "site:/lib/Db" | |
22 Db.close() | |
23 end |