comparison examples/blog/src/private/tools/backup.luan @ 779:c38f6619feb9

move blog into examples
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 28 Aug 2016 14:50:47 -0600
parents blog/src/private/tools/backup.luan@558740169005
children e2eb55d86bb2
comparison
equal deleted inserted replaced
778:305ffb00ebc1 779:c38f6619feb9
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.backup(backup)
10
11 Io.stdout = Http.response.text_writer()
12 %>
13 <html>
14 <body>
15 backed up to <a href="/private/local/backup.zip">/private/local/backup.zip</a>
16 </body>
17 </html>
18 <%
19 end