visionmedia/express — pull request #1342 by regality (2012-09-22 20:09:34+00:00)
Title: improves generator to autoload routes

The app that express generates isn't sooper helpful with the way it loads routes. This pull changes routes/index.js to recursively load all files from the routes directory.

For anything other than trivial apps I end up writing this every time, it would be good if express did it by default.

Each file just creates `exports.init`, which accepts and express app. This also shows the pattern of separating route definitions from controller logic.