I am looking for recommendations on setting up routers using Restify. I
would like to route to the appropriate requests in the most elegant way.
For example, I want to provide at least two ways to GET a customer.
server.get('/customers/:id', customers.findById);
server.get('/customers/:name', customers.findByName);
However, all requests route to .findById since it is the first route
defined. Is there a "good" way to handle this?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en