appherd
v3.0.1
Published
CLI to start & watch a set of local app servers
Downloads
3
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
}