Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于router.lua中的问题 #4

Open
jrcfcc opened this issue Apr 11, 2017 · 0 comments
Open

关于router.lua中的问题 #4

jrcfcc opened this issue Apr 11, 2017 · 0 comments

Comments

@jrcfcc
Copy link

jrcfcc commented Apr 11, 2017

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')
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant