Asynchronous programming

Asynchronous programming lets you start a long operation (reading a file, a network request) without blocking the program, which keeps running while it waits. Node uses callbacks, promises, and the async / await syntax for this. A blocking operation slows down the whole process.

Example

const data = await fs.promises.readFile('a.txt', 'utf8');

Related concepts

The whole glossary