Skip to content

Commit cbc1ca7

Browse files
eliaflavorjones
authored andcommitted
Default to port 3000 while allowing override
With this configuration `bin/dev` will use port 3000, but `bin/dev -p 3001` will correctly start the server on port 3001.
1 parent 3041a5b commit cbc1ca7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: lib/install/Procfile.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
web: env RUBY_DEBUG_OPEN=true bin/rails server -p 3000
1+
web: env RUBY_DEBUG_OPEN=true bin/rails server
22
css: bin/rails tailwindcss:watch

Diff for: lib/install/dev

+3
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ if ! gem list foreman -i --silent; then
55
gem install foreman
66
fi
77

8+
# Default to port 3000 if not specified
9+
export PORT="${PORT:-3000}"
10+
811
exec foreman start -f Procfile.dev "$@"

0 commit comments

Comments
 (0)