Mercurial Hosting > luan
comparison src/luan/modules/http/test.luan @ 1321:307e76ccd0d6
generalize separate logging
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 05 Feb 2019 22:36:55 -0700 |
parents | 7fc83fd2a39a |
children |
comparison
equal
deleted
inserted
replaced
1320:2c8d1d76a82a | 1321:307e76ccd0d6 |
---|---|
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 |
7 if #{...} ~= 2 then | 6 if #{...} ~= 2 then |
8 Io.stderr.write "usage: luan luan:http/test.luan dir test-URI\n" | 7 Io.stderr.write "usage: luan luan:http/test.luan dir test-URI\n" |
9 return | 8 return |
10 end | 9 end |
11 | 10 |
12 local dir, test = ... | 11 local dir, test = ... |
13 | 12 |
14 Logging.init() | |
15 Server.init_dir(dir) | 13 Server.init_dir(dir) |
16 Luan.do_file(test) | 14 Luan.do_file(test) |