Removing _ENV, Hello World becomes:
local Io = require "luan:Io"
local Http = require "luan:http/Http"
local M = {}
function M.respond()
Io.stdout = Http.response.text_writer()
%>
<html>
<body>
Hello World
</body>
</html>
<%
end
return M
An alternative would be to have pages return a function like this:
local Io = require "luan:Io"
local Http = require "luan:http/Http"
return function()
Io.stdout = Http.response.text_writer()
%>
<html>
<body>
Hello World
</body>
</html>
<%
end
What do you think?