summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/htest.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/htest.lua b/test/htest.lua
index a94e4c6..c24a042 100755
--- a/test/htest.lua
+++ b/test/htest.lua
@@ -23,7 +23,9 @@ package.cpath = '?.so'
local utils = require 'lem.utils'
local io = require 'lem.io'
local hathaway = require 'lem.hathaway'
-hathaway.import()
+
+hathaway.debug = print -- must be set before import()
+hathaway.import() -- when using single instance API
GET('/', function(req, res)
print(req.client:getpeer())
@@ -146,7 +148,6 @@ GETM('^/hello/([^/]+)$', function(req, res, name)
res:add('Hello, %s!\n', name)
end)
-hathaway.debug = print
if arg[1] == 'socket' then
local sock = assert(io.unix.listen('socket', 666))
Hathaway(sock)