Last active
March 17, 2016 09:04
-
-
Save sunnycmf/8928804 to your computer and use it in GitHub Desktop.
whats' the different between module.export VS exports.<method_name>
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
var ErrorLog = common.mongoose.model('ErrorLog', schema); | |
// differences of line 4 vs 5? | |
exports = module.exports = ErrorLog; | |
exports.ErrorLog = ErrorLog; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think
exports = module.exports = ErrorLog;
exports and object and the line 5 exports only the methodErrorLog
.