enjalot/tributary — pull request #74 by georules (2013-01-27 19:26:49+00:00)
Title: /api endpoints

Something like this could allow someone to dynamically request the API endpoints available, rather than having to look up documentation. This pulls the information from express' app.routes, and assumes that any URL with /api at the start is an api endpoint. This code will automatically update /api for any routes added later (get,post,put,delete). It's a little dirty that this is generated for every request to /api, but I'm not sure how we might want to cache this data.