Defining Mongoose Models in Separate Module

I like to define the database outside of the models file so that it can be configured using nconf. Another advantage is that you can reuse the Mongo connection outside of the models.

module.exports = function(mongoose) {
    var Material = new Schema({
        name                :    {type: String, index: true},
        id                  :    ObjectId,
        materialId          :    String,
        surcharge           :    String,
        colors              :    {
            colorName       :    String,
            colorId         :    String,
            surcharge       :    Number
        }
    });
    // declare seat covers here too
    var models = {
      Materials : mongoose.model('Materials', Material),
      SeatCovers : mongoose.model('SeatCovers', SeatCover)
    };
    return models;
}

and then you would call it like this...

var mongoose = require('mongoose');
mongoose.connect(config['database_url']);
var models = require('./models')(mongoose);
var velvet = new models.Materials({'name':'Velvet'});

The basic approach looks reasonable.

As an option you could consider a 'provider' module with model and controller functionality integrated. That way you could have the app.js instantiate the provider and then all controller functions can be executed by it. The app.js has to only specify the routes with the corresponding controller functionality to be implemented.

To tidy up a bit further you could also consider branching out the routes into a separate module with app.js as a glue between these modules.