How can you enable debugging in Express.js app?

Photo by Joan Gamell on Unsplash

How can you enable debugging in Express.js app?

Express uses the debug module internally to log information about route matches, middleware functions that are in use, application mode, and the flow of the request-response cycle.

To see all the internal logs used in Express, set the DEBUG environment variable to express:* when launching your app.

$ DEBUG=express:* node index.js

Source:

Debugging Express. expressjs.com/en/guide/debugging.html.