exec vs execFile nodeJs

I want to run a command in command-prompt using nodejs. Based on https://dzone.com/articles/understanding-execfile-spawn-exec-and-fork-in-node, i used child_process.execFile('protractor', ['./src/