Mercurial Hosting > luan
annotate website/src/examples/hi.luan @ 503:92c3d22745b8
make _ENV optional
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Wed, 20 May 2015 23:24:46 -0600 |
| parents | 598123096772 |
| children | 7bc63886d4f2 |
| rev | line source |
|---|---|
| 382 | 1 local Io = require "luan:Io" |
|
494
2b9bc97f0439
change luan:web to luan:http
Franklin Schmidt <fschmidt@gmail.com>
parents:
388
diff
changeset
|
2 local Http = require "luan:http/Http" |
| 382 | 3 |
| 503 | 4 local M = {} |
| 388 | 5 |
| 503 | 6 function M.respond() |
| 382 | 7 Io.stdout = Http.response.text_writer() |
| 8 %> | |
| 9 <html> | |
| 10 <body> | |
| 11 Hello World | |
| 12 </body> | |
| 13 </html> | |
| 14 <% | |
| 15 end | |
| 503 | 16 |
| 17 return M |
