title: Finding process id of a Node.js server in Windows
body: <p>To find a process id of a node.js server in unix, we use below code:</p>
  
  <pre><code>if (process.getgid) {
     console.log('Current gid: ' + process.getgid());
  }
  </code></pre>
  
  <p>So I get output as <code>1888</code> in *nix OS, but when I execute same in Windows OS, I am getting output as <code>undefined</code> also as per node.js docs they have explicitly mentioned this method won't work in windows. </p>
  
  <p>So my question, is there anyway I can get process id in windows os? I tried to execute <code>taskkill /f /im node.exe</code> but it kills all node processes, but I want to kill only particualr process. Is there anyway to achieve this?</p>