orchestron
v0.2.0
Published
Tool for executing commands and managing multiple processes through convenient interface
Downloads
3
Readme
Orchestron
What is it about?
Orchestron allows to add commands (aka processes) to any project, and provides interface to manage them through websockets.
Using built-in interface is not the requirement, if you can provide your own.
Example processes configuration
// orchestron.config.json
{
"processes": [
{
"name": "Regenerate",
"command": "./scripts/regenerate.sh",
"arguments": ["*"]
},
{
"name": "Build",
"command": "npm",
"arguments": ["run build"]
}
]
}
Installation
npm install --only=prod --save-dev orchestron
yarn add --dev orchestron
Usage
Orchestron can be used as standalone application, or in conjuction with already created app.
- In both cases you need to create
orchestron.config.json
file in your working directory. - Then, you need to import Orchestron, and launch it:
const orchestron = require('orchestron'); // Orchestron may also be imported as any UMD-compatible module system, like ES6
const port = 9999; // select port to start app on (default is 8123)
const configLocation = '../my-config.json'; // select config lcation (default is orchestron.config.json)
orchestron({ port, configLocation });
- Navigate to
localhost:<port>
and fiddle with built-in interface.
Configuration
Orchestron after launching will look for orchestron.config.json
file in working directory, that means, directory from which script is executing (not the directory the script is contained in).
Orchestron performs configuration file validation, and if it's invalid, process won't start and user will be informed about error.
Example configuration:
{
"processes": [ // Array of processes objects
{
"name": "Build", // Name of the process, needs to be unique.
"command": "npm", // Command to launch. It may be important to keep it as single-word/path.
"arguments": ["run build"], // Array of arguments, that command will be provided with
"autostart": false // Default: false. If set to true command will autolaunch on Orchestron launch
}
]
}
Custom interface
One can also see how built-in interface communicates with backend via websockets in ./src/frontend/services/Api.ts file.
Known issues
For list of all known issues see GitLab Issues