annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
693
ca169567ce07 module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents: 597
diff changeset
1 local Io = require "luan:Io.luan"
ca169567ce07 module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents: 597
diff changeset
2 local Http = require "luan:http/Http.luan"
ca169567ce07 module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents: 597
diff changeset
3 local Db = require "site:/lib/Db.luan"
597
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
4
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
5
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
6 return function()
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
7 local backup = Io.uri "site:/private/local/backup.zip"
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
8 backup.delete()
789
e2eb55d86bb2 add http/tools
Franklin Schmidt <fschmidt@gmail.com>
parents: 779
diff changeset
9 Db.zip(backup)
597
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
10
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
11 Io.stdout = Http.response.text_writer()
1216
5dbb552075ff doctype
Franklin Schmidt <fschmidt@gmail.com>
parents: 789
diff changeset
12 %>
5dbb552075ff doctype
Franklin Schmidt <fschmidt@gmail.com>
parents: 789
diff changeset
13 <!doctype html>
5dbb552075ff doctype
Franklin Schmidt <fschmidt@gmail.com>
parents: 789
diff changeset
14 <html>
597
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 <body>
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 backed up to <a href="/private/local/backup.zip">/private/local/backup.zip</a>
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
17 </body>
1216
5dbb552075ff doctype
Franklin Schmidt <fschmidt@gmail.com>
parents: 789
diff changeset
18 </html>
5dbb552075ff doctype
Franklin Schmidt <fschmidt@gmail.com>
parents: 789
diff changeset
19 <%
597
cb6c628de583 add blog tools
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
20 end