I have an idea of unifying startup scripts Procfile and script/foreman-start-dev into a single shell script that would be manipulating tmux terminal:
# start new tmux with two windows
# start detached (on the background)
# start only rails
# start only webpack
# similar commands for restart, stop etc
Procfile would only call this script to start rails and webpack separately.
This would mean that happy “foreman” gem users could keep using the “foreman” command while users who like debugging could use the script. The script could even work if no
tmux was installed, in that case it could simply start processes via shell job functionality (bg/fg etc) of course with the obvious limitation that you could only attach to a single process (rails).
I like another idea - this could be a nice entry point for new users, something like
rails init or
rails help. We could provide some meaningful information in the
foreman-dev help output and also we could provide some useful commands like