Waiter is an abstract development server for compiled languages. It runs your server, compiles it when you change a file, and manages compilation and server processes.
$ brew tap davejachimiak/tap
$ brew install waiter$ waiter SERVER_COMMAND BUILD_COMMAND [-f|--file-name-regex REGEX] [-d|--dir DIR]Example:
$ waiter "ENV=development ./blog-server" "cabal build" -f "hs$" -d ./lib
That would run your server binary ./blog-server with the environment
variable ENV set to development. It would run cabal build when
files with the regex hs$ in the ./lib tree change. After all build
processes finish, it would kill the previous ./blog-server process and
start a new one from the newly built binary.
This is the command that runs your server.
Example:
"ENV=developemnt ./blog-server"
This is the command that builds your server. It should generate the
binary run by SERVER_COMMAND.
Example:
"cabal build"
Only filenames matching this regex trigger BUILD_COMMANDs. Uses POSIX
regular expression interface. Defaults to .*.
Only changes to files in this directory's tree trigger BUILD_COMMANDs.
Defaults to ./src.
git cloneandcdinto this repo.cabal sandbox initcabal install