Last active
October 25, 2017 19:34
-
-
Save nidble/a801389b91e11f2139680db782cb5959 to your computer and use it in GitHub Desktop.
mongoose setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/KunalKapadia/express-mongoose-es6-rest-api | |
// print mongoose logs in dev env | |
if (config.MONGOOSE_DEBUG) { | |
mongoose.set('debug', (collectionName, method, query, doc) => { | |
debug(`${collectionName}.${method}`, util.inspect(query, false, 20), doc); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment