hub-dev-server

A Node.js command-line utility that allows hub developers to run a local copy of the Hub shell. This allows developers to run their applications locally in an environment that mimics our hosted environments.

Installation#

npm install @iqmetrix/hub-dev-server --save-dev

Usage#

npx hub-dev-server

Or add a script to your packages.json

"dev": "hub-dev-server"

By default a browser will open to http://localhost:9000/#dev

CLI Options#

Hub app development server. Allows proxying to local or remote apps, and a local or bundled shell.
Options:
-v, --version output the version number
-p, --port <port> Port to serve from (default: "9000")
-a, --app-host <app-host> Hub app address (default: "localhost:3000")
-s, --shell-host <shell-host> Hub shell address (example: "localhost:8000")
-d, --default-start-script <sta[rt-script> Default start script (default: "start")
-e, --environment <environment> The NODE_ENV environment variable to be passed to the app script (default: "development")
-n, --no-script Don't run the default app script
-l, --live-apps-env <env> Proxy app requests to the provided Hub environment (choices: "dev", "int", "rc", "prod")
-s, --script <script> Hub app serve or other scripts to run (default: ["npx cross-env BROWSER=none NODE_ENV=development npm run start --scripts-prepend-node-path"])
-b, --no-browser Don't open browser. Disabled if not using the default script
--preview-shell Use the new React-based Hub shell
--verbose Increase the verbosity of logging
-h, --help display help for command

Sources#

Last updated on by Garrett Samm