Async Hooks

Async Hooks API

init(asyncId, type, triggerAsyncId, resource)

  • why can't we console.log inside init?
const hook = require('./_hook-print.init.js')
hook.enable()

console.log('hello world')