title: How to detect if a node process/script is already running?
body: <p>Is there a way to programmatically detect if a node.js process (or script) is already running on the machine?</p>
  
  <p>I want to achieve this from the node script itself instead of relying on shell scripts or other ways of querying processes on the operating system. I know that this is possible in many programming languages such as Java and C# (using Mutex class for example). I am looking for an equivalent solution for Node.js projects.</p>