ukayani / restify-router

A router interface for restify that lets you aggregate route definitions and apply to a restify server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support object as first argument when defining methods for a Route

dsalin opened this issue · comments

Currently, a string is used as first argument to any Route method (get, put, post, etc.)
This prevents us from supplying version and other parameters to a route (or at least I have not found a way in current version of restify-router).

Please, add this feature or tell me if you encourage PRs. I'll try to do my best in this case :)

Hi @dsalin . PRs are definitely welcome :) If not, i'll look into making the change.

Actually, @dsalin after further looking at your comment. I believe we do support this behavior

See the following test case

In general, the interface is meant to be identical to that of restify server. So whatever you can do on that for route registration should be possible here.

Hope that helps.

Thank you very much @ukayani. Yes, this is what I was looking for.