Skip to content

Commit

Permalink
add foreman for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
chloerei committed Nov 4, 2024
1 parent c9cc800 commit 7a597c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: bin/rails server
js: bin/shakapacker-dev-server
13 changes: 11 additions & 2 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
#!/usr/bin/env ruby
exec "./bin/rails", "server", *ARGV
#!/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 --env /dev/null "$@"

0 comments on commit 7a597c9

Please sign in to comment.