Read a File with fs/promises (Node)
JavaScriptNode.js stdlib async file read with fs/promises.
import { readFile } from 'node:fs/promises';
const text = await readFile('data.txt', 'utf8');
console.log(text);
Node.js stdlib async file read with fs/promises.
import { readFile } from 'node:fs/promises';
const text = await readFile('data.txt', 'utf8');
console.log(text);