remex/README.md

25 lines
1.1 KiB
Markdown

# remex
execute local commands remotely via http requests
## configuration
configuration is done entirely within the file `config.json`.
### server: [*object*]
- listen: [*string*] listen address
- port: [*number*] port to listen on
### log: [*object*]
- level: [*string*] verbosity of the log; either `debug`, `info`, `warning` or `error`
- timestamp: [*string*] format string for the timestamp; review [moment.js](https://momentjs.com/docs/#/displaying/format/) for further information
### api: [*object-array*]
- url: [*string*] endpoint url; example: `/example`
- method: [*string*] http request method
- command: [*string*] command to execute
- args: [*string-array*] arguments to pass to the executed command
- options: [*object*]
- detach [*boolean*] detach from the executed command / do not wait for the command to finish
- unique [*boolean* or *string*] if set to `true` the command can not be executed again until it has finished; if set to `restart` the command will be killed (if active) and started again; if set to `toggle` the command will either be killed if active or started if not active