Mercurial Hosting > luan
annotate examples/blog/src/private/tools/backup.html.luan @ 1474:13cbce740e1e
LowercaseAnalyzer
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 17 Apr 2020 21:53:09 -0600 |
parents | 82415c9c0015 |
children |
rev | line source |
---|---|
1220 | 1 local Luan = require "luan:Luan.luan" |
2 local error = Luan.error | |
693
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
597
diff
changeset
|
3 local Io = require "luan:Io.luan" |
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
597
diff
changeset
|
4 local Http = require "luan:http/Http.luan" |
1429
82415c9c0015
move versioning into Lucene
Franklin Schmidt <fschmidt@gmail.com>
parents:
1220
diff
changeset
|
5 local Db = require "site:/lib/Db.luan" |
597 | 6 |
7 | |
8 return function() | |
9 local backup = Io.uri "site:/private/local/backup.zip" | |
10 backup.delete() | |
1429
82415c9c0015
move versioning into Lucene
Franklin Schmidt <fschmidt@gmail.com>
parents:
1220
diff
changeset
|
11 Db.zip(backup) |
597 | 12 |
13 Io.stdout = Http.response.text_writer() | |
1216 | 14 %> |
15 <!doctype html> | |
16 <html> | |
597 | 17 <body> |
18 backed up to <a href="/private/local/backup.zip">/private/local/backup.zip</a> | |
19 </body> | |
1216 | 20 </html> |
21 <% | |
597 | 22 end |