Add debug arg
This commit is contained in:
parent
2fd2151f63
commit
43037c026b
3
index.js
3
index.js
|
|
@ -25,6 +25,9 @@ app.use(express.static('public'));
|
||||||
|
|
||||||
//Debugger
|
//Debugger
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
|
if (process.env.DEBUG !== 'true') {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
console.log(`${req.method} ${req.url}`);
|
console.log(`${req.method} ${req.url}`);
|
||||||
console.log('Body:', req.body);
|
console.log('Body:', req.body);
|
||||||
console.log('Query:', req.query);
|
console.log('Query:', req.query);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue