Mercurial Hosting > luan
comparison examples/blog/src/private/tools/backup.html.luan @ 1217:4c2972f4d862
.html in examples
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 20 Mar 2018 15:43:16 -0600 |
parents | examples/blog/src/private/tools/backup.luan@5dbb552075ff |
children | 4721c482c86b |
comparison
equal
deleted
inserted
replaced
1216:5dbb552075ff | 1217:4c2972f4d862 |
---|---|
1 local Io = require "luan:Io.luan" | |
2 local Http = require "luan:http/Http.luan" | |
3 local Db = require "site:/lib/Db.luan" | |
4 | |
5 | |
6 return function() | |
7 local backup = Io.uri "site:/private/local/backup.zip" | |
8 backup.delete() | |
9 Db.zip(backup) | |
10 | |
11 Io.stdout = Http.response.text_writer() | |
12 %> | |
13 <!doctype html> | |
14 <html> | |
15 <body> | |
16 backed up to <a href="/private/local/backup.zip">/private/local/backup.zip</a> | |
17 </body> | |
18 </html> | |
19 <% | |
20 end |