History of 2022-05-16 Two simple helpers for debugging Express.js applications

2022-05-16
10:50 UTC Revision 1 . . . . mborkSometimes, when debugging Express.js applications, it happens that one of the many middlewares for some route is misbehaving and either redirects to somewhere it shouldn’t, hangs or something like this, resulting in a 500. While it is possible to attach a debugger to Node.js, a good ol’ console.log is often an easy and fast way to find a culprit. Especially with this very simple middleware: