You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function map(route_table, route_order, uri, func_name) local ret, err = pcall(_map, route_table, route_order, uri, func_name) if not ret then local error_info = "MOOCHINE URL Mapping Error:[" .. uri .. "=>" .. func_name .. "] " .. err logger:e(error_info) ngx.log(ngx.ERR, error_info) end end
luasrc\mch\router.lua中的map有4个参数,但是demo中调用的时候只传了两个参数,一个uri,一个func_name
想请教下是什么情况
function map(route_table, route_order, uri, func_name) local ret, err = pcall(_map, route_table, route_order, uri, func_name) if not ret then local error_info = "MOOCHINE URL Mapping Error:[" .. uri .. "=>" .. func_name .. "] " .. err logger:e(error_info) ngx.log(ngx.ERR, error_info) end end
`local router = require('mch.router')
router.setup()
map('^/mchconsole', 'mch.console.start')
map('^/hello%?name=(.*)', 'test.hello')
map('^/longtext', 'test.longtext')
map('^/ltp', 'test.ltp')
`
The text was updated successfully, but these errors were encountered: