The Hubs Client (and Hubs Admin, since it uses the same infrastructure) is managed using NPM, a build management tool for NodeJS. Using the npm command-line tool, the Hubs Client server can install dependencies, run tests, and spin itself up.
The configuration file for NPM is package.json, located in the root of the Hubs Client directory. package.json contains a section called scripts that can be used to create various NodeJS commands. For example, look at the following excerpt from Mozilla's own package.json file:
Each of these JSON attributes--start, dev, and local--defines a command for starting the Hubs Client server with different parameters. You can run these commands from your shell by running npm run <command-name>.
By modifying our own package.json file, we could create our own commands for different environments. Perhaps we could have a "prod" command for the production server and a "dev" command for running locally on our development virtual machine.
The Hubs Client (and Hubs Admin, since it uses the same infrastructure) is managed using NPM, a build management tool for NodeJS. Using the
npm
command-line tool, the Hubs Client server can install dependencies, run tests, and spin itself up.The configuration file for NPM is
package.json
, located in the root of the Hubs Client directory.package.json
contains a section called scripts that can be used to create various NodeJS commands. For example, look at the following excerpt from Mozilla's ownpackage.json
file:Each of these JSON attributes--start, dev, and local--defines a command for starting the Hubs Client server with different parameters. You can run these commands from your shell by running
npm run <command-name>
.By modifying our own
package.json
file, we could create our own commands for different environments. Perhaps we could have a "prod" command for the production server and a "dev" command for running locally on our development virtual machine.