Aem A thinks this is interesting: Make sure that your Mongoose configuration file is loaded before any other configuration in the server.js file. This is important since any module that is loaded after this module will be able to use the User model without loading it by itself. From Understanding Mongoose schemas from MEAN Web Development by Amos Q. Haviv Publisher: Packt Publishing Released: September 2014 Note load mongoose configuration before any other, in server.js Share this highlight http://www.safaribooksonline.com/a/mean-web-development/52037/ Twitter Facebook Google Plus Email Get Instant Access Now Start a Free Trial Learn about Safari for Business Have an account? Sign in. Minimise Unlock the rest of MEAN Web Development and 30,000 other books and videos By clicking this box, you confirm that you have read and agree to the terms and conditions of our Membership Agreement, and you understand that when your trial period ends, you will be required to provide billing information if you wish to continue using the service. Unlock the rest of this book Start a Free 10-Day Trial loading Learn about Safari for Business Have an account? Sign in.