You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Last week I was getting ENOENT exceptions from Nodemon when trying to cluster.fork() my app. But this was happening only when running the CoffeeScript entry file, compiling it to vanilla JS is OK and running. Maybe it has something to do with my Windows PC, maybe not, I can't figure it out.
CoffeeScript module is installed, other scripts work, and it also runs fine without clustering.
Edit: seems to be in the same line with issue #214
Here's the pretty simple Compound.JS startup script:
#!/usr/bin/env node
app = module.exports = getServerInstance = (params) ->
params = params || {}
params.root = params.root || __dirname;
return require('compound').createServer(params);
cluster = require('cluster')
osData = require('os')
numCPUs = osData.cpus().length
if !module.parent
port = process.env.PORT || 3000
host = process.env.HOST || '0.0.0.0'
server = app();
if cluster.isMaster
cluster.fork() for i in [0...numCPUs] by 1
cluster.on('exit', (worker, code, signal) ->
console.log 'Worker %d died with code %d', worker.process.pid, code
)
else
server.listen(port, host, () ->
console.log 'Worker %d listening on %s:%d within %s environment', cluster.worker.id, host, port, server.set('env')
);
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3
Hi,
Last week I was getting ENOENT exceptions from Nodemon when trying to cluster.fork() my app. But this was happening only when running the CoffeeScript entry file, compiling it to vanilla JS is OK and running. Maybe it has something to do with my Windows PC, maybe not, I can't figure it out.
CoffeeScript module is installed, other scripts work, and it also runs fine without clustering.
Edit: seems to be in the same line with issue #214
Here's the pretty simple Compound.JS startup script:
The text was updated successfully, but these errors were encountered: