Mercurial Hosting > luan
annotate website/src/examples/hi.luan @ 876:2efdb98f3543
use just one fixed Connector in Server
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 04 Oct 2016 14:05:45 -0600 |
| parents | 2113294ccc6d |
| children | 49cf706c326a |
| rev | line source |
|---|---|
|
693
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
505
diff
changeset
|
1 local Io = require "luan:Io.luan" |
|
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
505
diff
changeset
|
2 local Http = require "luan:http/Http.luan" |
| 382 | 3 |
| 388 | 4 |
|
505
7bc63886d4f2
web page modules now return a function
Franklin Schmidt <fschmidt@gmail.com>
parents:
503
diff
changeset
|
5 return function() |
| 382 | 6 Io.stdout = Http.response.text_writer() |
| 736 | 7 %> |
| 8 <html> | |
| 9 <body> | |
| 10 Hello World | |
| 11 </body> | |
| 12 </html> | |
| 13 <% | |
| 382 | 14 end |
