You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devbug/app/routing/middleware/Debug.middleware.js

27 lines
752 B

5 years ago
/*
* Debug Middleware
* -------------------------------------------------------------
* Put some description here!
*/
const Middleware = require('libflitter/middleware/Middleware')
class Debug extends Middleware {
5 years ago
/*
* Run the middleware test.
* This method is required by all Flitter middleware.
* It should either call the next function in the stack,
* or it should handle the response accordingly.
*/
test(req, res, next, args = {}) {
5 years ago
console.log('DEBUGGING LAYER:')
console.log('Incoming destination: ' + req.originalUrl)
console.log('Incoming method: ' + req.method)
5 years ago
/*
* Call the next function in the stack.
*/
next()
}
}
module.exports = Debug