how to get the node fs module in node.js code example
Example 1: node read file sync
// macOS, Linux, and Windows
fs.readFileSync('<directory>');
// => [Error: EISDIR: illegal operation on a directory, read <directory>]
// FreeBSD
fs.readFileSync('<directory>'); // => <data>
Example 2: fs readfile encoding
fs.readFile('/etc/passwd', 'utf8', callback);