Node.js · Junior · Question 43 of 75

Why should you avoid fs.readFileSync inside an HTTP request handler?

Explanation

Sync calls are fine at startup (loading config) or in CLI scripts. In a server, use fs/promises or streams.

Further reading

Problem with a question

Node.js · Junior · question 43

Test yourself

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

Take this quiz