Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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