punkave/whereabouts — pull request #11 by boutell (2013-01-26 18:41:32+00:00)
Title: Refactoring: separated the model layer, with proper injection of its options and the db; one app-wide configuration file with nested objects

* people.js was *almost* a cleanly separated model layer, it did almost nothing with req and res. So I took it the rest of the way. All the routes are in app.js, except for that one route hanging out in index.js. See model/people.js. You could have a routes/people.js too if you wanted to get the routes out of app.js
* people.js has a proper constructor and exports a convenience function to call it, so we can inject the database properly when setting it up