comparison src/luan/modules/http/test.luan @ 1218:a50803fde972

http/tools cleanup
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 20 Mar 2018 16:24:59 -0600
parents 1a68fc55a80c
children 7fc83fd2a39a
comparison
equal deleted inserted replaced
1217:4c2972f4d862 1218:a50803fde972
1 local Luan = require "luan:Luan.luan" 1 local Luan = require "luan:Luan.luan"
2 local Io = require "luan:Io.luan" 2 local Io = require "luan:Io.luan"
3 local Server = require "luan:http/Server.luan" 3 local Server = require "luan:http/Server.luan"
4 local Logging = require "luan:logging/Logging.luan"
5
4 6
5 if #{...} ~= 2 then 7 if #{...} ~= 2 then
6 Io.stderr.write "usage: luan luan:http/serve dir-URI test-URI\n" 8 Io.stderr.write "usage: luan luan:http/serve dir test-URI\n"
7 return 9 return
8 end 10 end
9 11
10 local dir, test = ... 12 local dir, test = ...
11 Server.init(dir) 13
14 Logging.init()
15 Server.init_dir(dir)
12 Luan.do_file(test) 16 Luan.do_file(test)