Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created September 16, 2020 14:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save BetterProgramming/6cf6e8b754bd62b24ca08e6e7395a41a to your computer and use it in GitHub Desktop.
const logger = require("../logger")
exports.findUserByUsername = async (req, res) => {
logger.info(`Invoking findUserById with the id ${req.params.username}`)
//implementation
logger.debug(`Finding user data from the database ${userModel.find({username: req.params.username})}`) //could throw an error.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment