Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fs.readFileSync is blocking the event loop #252
Here you are using
As I have understood how Node.js works in a website environment, using a Synchronous command temporary blocks other requests, even from other clients/visitors. So if you are loading
Any thoughts on this? I'm not a Node.js expert and this is simply how I have always interpreted the Sync commands to work in a website (multi-user) project. If anyone could correct me or educate me if I'm wrong I would be interested in hearing it though.
And switching this over to an async statement would be very easy to do.