Download spectrum/shared/middlewares/logging.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 374 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/middlewares/logging.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/shared/middlewares/logging.js
-
curl -L -o logging.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/shared/middlewares/logging.js
374 Bytes
| // @flow | |
| // Log requests with debug | |
| const debug = require('debug')('shared:middlewares:logging'); | |
| module.exports = ( | |
| req: express$Request, | |
| res: express$Response, | |
| next: express$NextFunction | |
| ) => { | |
| if (req.body && req.body.operationName) { | |
| debug(`requesting ${req.url}: ${req.body.operationName}`); | |
| } else { | |
| debug(`requesting ${req.url}`); | |
| } | |
| next(); | |
| }; | |