Mercurial Hosting > luan
diff website/src/examples/hi2.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 | ca169567ce07 |
line wrap: on
line diff
--- a/website/src/examples/hi2.luan Thu May 21 01:09:35 2015 -0600 +++ b/website/src/examples/hi2.luan Thu May 21 01:45:49 2015 -0600 @@ -1,7 +1,6 @@ local Io = require "luan:Io" local Http = require "luan:http/Http" -local M = {} local function form() %> @@ -29,7 +28,7 @@ <% end -function M.respond() +return function() Io.stdout = Http.response.text_writer() local name = Http.request.parameter.name if name == nil then @@ -38,5 +37,3 @@ hello(name) end end - -return M