I'm working with the Nodepad tutorial on DailyJS. I've forked it and am extending it to work for my own purposes. One issue I have with it is that the whole application is written in the app.js file, and I prefer to separate my application a bit more. How should I write mongo into my seperate Model files since everything mongoose related is in app.js.

What do I need to bring over to my external files so that they can properly connect to the database and understand my mongoose schemas?

In this design, is it appropriate to put the business logic in user.js or elsewhere? You can see the approximate structure I'm working towards at: github.com/johndierks/timetracker
–
JohnSep 6 '12 at 18:48

I looked at your models and I think they look fine.
–
JP RichardsonSep 6 '12 at 19:20

The neatest way to do this is to register the models with Mongoose on app init as you've done, then when you want to work with them, simply retrieve them from Mongoose, rather than requiring 'user' again.

You can also make things easier by opening the default connection with Mongoose, unless you have specific requirements that mean you have to manually manage each connection.