I know what the cluster package solves (crazy that node.js is single-threaded, when there are alternatives like Go or Rust, but eh); but I don't know much about how it works. I read a bit about it this morning, but it didn't inform much about how to solve my specific problem, so I'm not 100% sure I'm doing it right.
Basically: cluster.isMaster resolves to true in dev, and since the HTTP listening is stated in the else of that thing, the listening was never even started in my dev environment. So, I just changed the condition so that cluster is never used in dev (arguably, it's only useful in production anyway); the downside is that it makes an application-level difference with production, which I know is not ideal, so feel free to interject.
The upside is: all issues solved, my environment is entirely up now. :)
I know what the
cluster
package solves (crazy that node.js is single-threaded, when there are alternatives like Go or Rust, but eh); but I don't know much about how it works. I read a bit about it this morning, but it didn't inform much about how to solve my specific problem, so I'm not 100% sure I'm doing it right.Basically:
cluster.isMaster
resolves totrue
in dev, and since the HTTP listening is stated in theelse
of that thing, the listening was never even started in my dev environment. So, I just changed the condition so thatcluster
is never used in dev (arguably, it's only useful in production anyway); the downside is that it makes an application-level difference with production, which I know is not ideal, so feel free to interject.The upside is: all issues solved, my environment is entirely up now. :)