dictator
Process management for development.
- Start up processes in order
- Configurable wait time to allow dependencies to start up properly
- Colorized output (stdout & stderr)
- If child exits, terminate everything
- If dictator exits, terminate everything
- Looks for dictator.json in current dir (or specify filename in first arg)
install
npm install -g dictator
usage
Create a dictator.json in the root of your project
Then run the dictator:
dictator [/path/to/dictator.json]
Will do the following:
- Start some-rails-app by changing the cwd to
rails-root
and runinngrails s
and logging its output in yellow - Start elasticsearch, log its output in green, wait 3000 to let it initialize
- Start redis-server, log its output in red
- Start some-node-server, log its output in blue
If any of the processes quit the others will receive a SIGKILL and dictator will exit.
exclude some services
dictator -e nope
run only some services
dictator -o yes -o indeed
pro tips
- Set up a
config
directory next to yourdictator.json
and put all configuration in there - Set up a
state
directroy next to yourdictator.json
and configure your services to put all their state (DBs, logs, etc) in there - For a nice reset of the environment, simply:
rm -rf state/*
before running thedictator
. Remove the current state and run the dictator. You get it? A coup. Ok, I'm stopping it.