Runs many processes
Create a prconfig.yaml
file. Name a process & add the relevant commands and arguments.
processes:
sass:
directory: examples/frontend
command: sass
args: ["sass/index.scss", "css/index.css", "--watch"]
bash:
directory: examples/bash
command: ./test.sh
env:
SERVER_NAME: "Columbo"
go run process_runner.go -dir <DIRPATH TO prconfig.yaml>
If any process exits unexpectedly, then process-runner will exit with the error details for that process.
-
processes
Top level of the processes config file
-
[name]
This is the process name you want to assign (it can be any string)
-
directory
The relative or absolute path to the directory that the process will be run from
-
command
The command that will be run eg. go, ./, make ... .etc
-
args
The command arguments as an array e.g
["-t", "-o"]
-
env
Sets environment variables for the process.
processes:
server_1:
directory: examples/servers/server_1
command: go
args: ["run", "serverOne.go"]
server_2:
directory: examples/servers/server_2
command: go
args: ["run", "serverTwo.go"]
... etc.
This example logs to std output a Go's mux server's logs / std output