Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

appherd

khoomeister2MIT3.0.1

CLI to start & watch a set of local app servers

readme

appherd

CLI to start & watch a bunch of local app servers:

  • Scans for open ports and passes them to the app servers through the PORT environment variable
  • Will restart a server if the process dies
  • Opens a HTTP endpoint which returns server to port mappings for service discovery
  • Each app's output goes straight to stdout/stderr, therefore each app is responsible for identifying itself in its loglines

Usage

The directory where you run appherd must have a configuration file called appherd.json:

{
  "port": 7000,
  "apps": {
    "server1": {
      "command": "node",
      "args": ["server1/index.js"]
    },
    "server2": {
      "command": "node",
      "args": ["server2/index.js"]
    }
  }
}

Once that's set up, run appherd.

Open http://localhost:7000. Given port 7001 and 7002 are free, you should get the following JSON response with the above configuration:

{
  "server1": 7001,
  "server2": 7002
}

changelog

3.0.1

  • rename appherder to appherd - @khoomeister

3.0.0

  • updated license - @khoomeister
  • changed to class to avoid race condition with binding events - @khoomeister

2.0.0

  • change to use object for config instead of array - @khoomeister

1.0.0

  • refactor index & cli and add tests - @khoomeister

0.0.1

  • Initial commit - @khoomeister