comparison website/src/tutorial.html.luan @ 505:7bc63886d4f2

web page modules now return a function
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 May 2015 01:45:49 -0600
parents 92c3d22745b8
children d96944467ffc
comparison
equal deleted inserted replaced
504:dbdf4b8193a8 505:7bc63886d4f2
1 local Io = require "luan:Io" 1 local Io = require "luan:Io"
2 local Html = require "luan:Html" 2 local Html = require "luan:Html"
3 local Http = require "luan:http/Http" 3 local Http = require "luan:http/Http"
4 local Shared = require "site:/Shared" 4 local Shared = require "site:/Shared"
5 5
6 local M = {}
7 6
8 function M.respond() 7 return function()
9 Io.stdout = Http.response.text_writer() 8 Io.stdout = Http.response.text_writer()
10 %> 9 %>
11 <html> 10 <html>
12 <head> 11 <head>
13 <% Html.simply_html_head() %> 12 <% Html.simply_html_head() %>
108 <% Html.simply_html_body_bottom() %> 107 <% Html.simply_html_body_bottom() %>
109 </body> 108 </body>
110 </html> 109 </html>
111 <% 110 <%
112 end 111 end
113
114 return M