Service-runner

Service-runner is a library that provides generalized runtime facilities for node services, including: It is used in basically all Wikimedia node.js services.
 * a standard worker cluster setup with restarts,
 * a generalized yaml config format with support for running multiple services in a single process,
 * runtime facilities for
 * logging
 * metrics reporting
 * rate limiting.

The main documentation can be found in the README document. This page is intended to augment this documentation with a FAQ, and possibly tutorial-style content.

Why are you using a server.js stub in the root of the repository, rather than using `npm start` directly?
The method of passing parameters to the script with  (as in  ) was only introduced in npm 2. Until npm in Debian is updated to >= 2.0 (it's at 1.4 still, even with node 4.6), we'll need the server.js work-around. This won't work either because all services are firejailed and firejail needs the master process to be started. Separately, it is not recommended to use npm start in production since (a) npm is a node package manager (b) you want to control what processes get started and how and npm start is considered "magic".