I cannot figure out how async/await works. I slightly understands it but I can\'t make it work.
async
await
This is TypeScript version of @Joel's answer. It is usable after Node 11.0:
import { promises as fs } from 'fs'; async function loadMonoCounter() { const data = await fs.readFile('monolitic.txt', 'binary'); return Buffer.from(data); }