WebStorm How run nodejs as root to execute shell commands?

node.js, sudo, webstorm

Solution

The easiest way is to run WebStorm itself with root, parent node process will inherit the privileges.

Problem

How Can I run a node.js application through WebStorm IDE with root privileges in order to let node.js run shell commands? Thanks in advance!

Original source