File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1328,6 +1328,7 @@ local exports = {
1328
1328
internal = {
1329
1329
response_mt = response_mt ,
1330
1330
request_mt = request_mt ,
1331
+ extend = extend ,
1331
1332
}
1332
1333
}
1333
1334
Original file line number Diff line number Diff line change @@ -8,15 +8,18 @@ helpers.base_port = 12345
8
8
helpers .base_host = ' 127.0.0.1'
9
9
helpers .base_uri = (' http://%s:%s' ):format (helpers .base_host , helpers .base_port )
10
10
11
- helpers .cfgserv = function ()
11
+ helpers .cfgserv = function (opts )
12
12
local path = os.getenv (' LUA_SOURCE_DIR' ) or ' ./'
13
13
path = fio .pathjoin (path , ' test' )
14
14
15
- local httpd = http_server .new (helpers .base_host , helpers .base_port , {
15
+ local opts = opts or {}
16
+ local opts = http_server .internal .extend ({
16
17
app_dir = path ,
17
18
log_requests = false ,
18
19
log_errors = false
19
- })
20
+ }, opts )
21
+
22
+ local httpd = http_server .new (helpers .base_host , helpers .base_port , opts )
20
23
:route ({path = ' /abc/:cde/:def' , name = ' test' }, function () end )
21
24
:route ({path = ' /abc' }, function () end )
22
25
:route ({path = ' /ctxaction' }, ' module.controller#action' )
You can’t perform that action at this time.
0 commit comments