Node.js readFile isssues

Node.js readFile isssues
0

#1

does anyone know if i can use node.js readFile function to read a file in the browser i already have broswerfy doing the require work for me but when i create the bundle.js file the console tells me the that the fs.readFile() is not a function so does that mean it only exist on a node environment?


#2

Yep! It exists only on a server where Node.js is installed. Even if the syntax is javascript, it works the same way as a server side programming language


#3

Thanks for the confirmation!