Mercurial Hosting > luan
annotate http/src/luan/modules/http/test.luan @ 508:9218f9cf45d3
various fixes
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 May 2015 20:20:54 -0600 |
parents | 2b9bc97f0439 |
children | ca169567ce07 |
rev | line source |
---|---|
508 | 1 local Luan = require "luan:Luan" |
450 | 2 local Io = require "luan:Io" |
494
2b9bc97f0439
change luan:web to luan:http
Franklin Schmidt <fschmidt@gmail.com>
parents:
493
diff
changeset
|
3 local Server = require "luan:http/Server" |
450 | 4 |
5 if #{...} ~= 2 then | |
494
2b9bc97f0439
change luan:web to luan:http
Franklin Schmidt <fschmidt@gmail.com>
parents:
493
diff
changeset
|
6 Io.stderr.write "usage: luan luan:http/serve dir-URI test-URI\n" |
450 | 7 return |
8 end | |
9 | |
10 local dir, test = ... | |
11 Server.init(dir) | |
508 | 12 Luan.do_file(test,true) |