devbug/app/routing/middleware/Debug.middleware.js

27 lines
752 B
JavaScript
Raw Normal View History

2019-06-24 14:35:49 +00:00
/*
* Debug Middleware
* -------------------------------------------------------------
* Put some description here!
*/
const Middleware = require('libflitter/middleware/Middleware')
class Debug extends Middleware {
2019-06-24 14:35:49 +00:00
/*
* 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 = {}) {
2019-06-24 14:35:49 +00:00
console.log('DEBUGGING LAYER:')
console.log('Incoming destination: ' + req.originalUrl)
console.log('Incoming method: ' + req.method)
2019-06-24 14:35:49 +00:00
/*
* Call the next function in the stack.
*/
next()
}
}
module.exports = Debug