This commit is contained in:
parent
8a36273325
commit
f46e61e1a3
7
lib/api/dump.js
Normal file
7
lib/api/dump.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
module.exports = (req,res,next) => {
|
||||||
|
console.log(req.method, req.originalUrl);
|
||||||
|
console.log(JSON.stringify(req.headers));
|
||||||
|
console.log('');
|
||||||
|
console.log(JSON.stringify(req.body, null, 2));
|
||||||
|
next();
|
||||||
|
};
|
@ -10,6 +10,7 @@
|
|||||||
const router = require ('express')
|
const router = require ('express')
|
||||||
.Router ();
|
.Router ();
|
||||||
|
|
||||||
|
router.use(require('./dump'));
|
||||||
router.get ('/log', require ('./get-log'));
|
router.get ('/log', require ('./get-log'));
|
||||||
router.get ('/app', require ('./get-app'));
|
router.get ('/app', require ('./get-app'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user