Partial clone from https://github.com/madhums/node-express-mongoose-demo