Created
July 14, 2019 17:36
-
-
Save deyvisonborges/81f022881653d3a6688fb401dd22243f to your computer and use it in GitHub Desktop.
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
// | |
// Middleware para fazer a contagem de requisições feitas nas URL's. | |
// | |
let contador = 0; | |
const adicionar = async (req, res, next) => { | |
contador += 1; | |
next(); | |
}; | |
const contar = () => { | |
return contador; | |
}; | |
module.exports = { | |
adicionar, | |
contar, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment