From 194265a677ce42b3bd2ddf041c332f490e17e52b Mon Sep 17 00:00:00 2001 From: Trinity Takei Date: Mon, 1 Jul 2024 15:08:33 +0200 Subject: [PATCH] [DX] Prefer overmind to foreman If available, use overmind. Fallback to foreman otherwise (windows, preference etc). Overmind is more stable, provides various featues as it's based on tmux, makes it trivial to stop/restart to/attach to processes (that you stopped with binding.irb, for example), so over all I feel like it's a better DX. Foreman is fine too (it's part of Omakase Rails now), so you can't really go wrong using it either --- bin/dev | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/dev b/bin/dev index eda330c..78c64d4 100755 --- a/bin/dev +++ b/bin/dev @@ -1,11 +1,13 @@ #!/usr/bin/env sh -if gem list --no-installed --exact --silent foreman; then - echo "Installing foreman..." - gem install foreman -fi - -# Default to port 3000 if not specified export PORT="${PORT:-3000}" -exec foreman start -f Procfile.dev "$@" +if command -v overmind > /dev/null 2>&1; then + exec overmind start -f Procfile.dev "$@" +else + if gem list --no-installed --exact --silent foreman; then + echo "Installing foreman..." + gem install foreman + fi + exec foreman start -f Procfile.dev "$@" +fi