Node Foundamentals — Part 1, core modules

Execute a child process

const { exec } = require('child_process');
// List files in a directory (use 'dir' in Windows)
exec('ls', (err, stdout) => {
// Callback
if (err) { return err; }
console.log(stdout);
});

More info here.

Like what you read? Give Alessandro Piana a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.