-1
我想創建一個nodejs集羣來實例化大量'bot'實例,同時忽略任何錯誤。我做到了這一點,但它似乎也實例化了另一個不需要的'server.js'。我將如何做到這一點?NodeJS集羣如何
server.js:https://hastebin.com/fomulopoki.js
floodmanager.js(集羣):https://hastebin.com/mocaneyeso.php
錯誤控制檯(垃圾郵件很多):
Error: bind EADDRINUSE null:3000
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at cb (net.js:1327:16)
at shared (cluster.js:619:5)
at Worker.<anonymous> (cluster.js:592:9)
at process.<anonymous> (cluster.js:765:8)
at emitTwo (events.js:111:20)
at process.emit (events.js:191:7)
at process.nextTick (internal/child_process.js:753:12)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
Server is up and running...
Server is up and running...
events.js:160
throw er; // Unhandled 'error' event
^
相關代碼必須粘貼到您的實際問題中,而不僅僅在外部鏈接中可用。這些是stackoverflow發佈規則。而且,爲什麼你的JS文件的擴展名是.php? – jfriend00