July 2017
Intermediate to advanced
656 pages
16h 1m
English
We simply have to set the NODE_DEBUG environment variable to one or more of the supported flags.
Let's start with the timer flag by running our app like so:
$ NODE_DEBUG=timer node index.js
This should show something like the following screenshot:

Let's try running the process again with both timer and http flags enabled:
$ NODE_DEBUG=timer,http node index.js
Now we need to trigger some HTTP operations to get any meaningful output, so let's send a request to the HTTP server using curl (or an alternative method, such as navigating to http://localhost:3000 in the browser):
$ curl http://localhost:3000 ...