title: How to cluster a node js app without http server?
body: <p>I try to learn about clustering, but all the examples use some http server.</p>
  <p>My app uses multiple ws ( websocket ) client instances which are initialized inside to login to a server.</p>
  <p>On top level I just want node js to use multiple cores without duplicating the connections, file logs, and other logs from the app.</p>
  <pre><code>
  const cluster       = require('cluster')
  const config        = require('../config.json').sys
  const core          = require('./test')
  
  process.title = config.title
  ;(async () =&gt; {
  
  if (cluster.isMaster){ 
  
      for (let i = 0; i &lt; require('os').cpus().length; i++) cluster.fork()
  
      await core() // app i want to start
  
  } 
  
  
  })()
  
  </code></pre>
  <p>Would this now still benefit from all cpu's?</p>