Skip to content

Commit

Permalink
Default to port 3000 while allowing override
Browse files Browse the repository at this point in the history
With this configuration `bin/dev` will use port 3000,
but `bin/dev -p 3001` will correctly start the server on port 3001.
  • Loading branch information
elia committed Nov 16, 2023
1 parent 8f33c4f commit 5aa10e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/install/Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: env RUBY_DEBUG_OPEN=true bin/rails server -p 3000
web: env RUBY_DEBUG_OPEN=true bin/rails server
css: bin/rails tailwindcss:watch
3 changes: 3 additions & 0 deletions lib/install/dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ if ! gem list foreman -i --silent; then
gem install foreman
fi

# Default to port 3000 if not specified
export PORT="${PORT:-3000}"

exec foreman start -f Procfile.dev "$@"

0 comments on commit 5aa10e6

Please sign in to comment.