Mercurial Hosting > luan
annotate src/luan/modules/http/test.luan @ 1281:7fc83fd2a39a
http/Server cleanup
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 20 Dec 2018 14:09:19 -0700 |
parents | a50803fde972 |
children | 307e76ccd0d6 |
rev | line source |
---|---|
693
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
508
diff
changeset
|
1 local Luan = require "luan:Luan.luan" |
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
508
diff
changeset
|
2 local Io = require "luan:Io.luan" |
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
508
diff
changeset
|
3 local Server = require "luan:http/Server.luan" |
1218 | 4 local Logging = require "luan:logging/Logging.luan" |
5 | |
450 | 6 |
7 if #{...} ~= 2 then | |
1281 | 8 Io.stderr.write "usage: luan luan:http/test.luan dir test-URI\n" |
450 | 9 return |
10 end | |
11 | |
12 local dir, test = ... | |
1218 | 13 |
14 Logging.init() | |
15 Server.init_dir(dir) | |
693
ca169567ce07
module URIs must now include ".luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
508
diff
changeset
|
16 Luan.do_file(test) |