Navy's framework for Node.js webservers
src/controller | ||
.eslintrc.json | ||
.gitignore | ||
index.js | ||
options.json | ||
package.json | ||
README.md | ||
yarn.lock |
Navy's webserver framework
A template repository for creating Node.js based webservers with sharding.
Main components
Controller: /src/controller/Controller.js
Master process, orchestrates the whole program. Takes care of starting up the shards and communication with them.
Shard.js: /src/controller/Shard.js
Manages the forked processes. Essentially a wrapper for ChildProcess.
Server.js: /src/server/Server.js
Main component that runs on the forked processes. Expects a message with a _start
property with the startup options to be sent.