Node.js · Middle · Question 72 of 75

What is AsyncLocalStorage used for?

Explanation

Call storage.run(context, handler) at the start of a request; any code it calls, sync or async, can read the context with storage.getStore().

Further reading

Problem with a question

Node.js · Middle · question 72

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz