Skip to content

Commit

Permalink
Set 3000 as the default web port
Browse files Browse the repository at this point in the history
Having by default `PORT=` only assigns to that variable `0`, which is
interpreted by puma to start the web app in a random port when `bin/dev`
is called. Also `export`ing the port in this file is useless, as in the
foreman context, it's eventually overriden by the settings of your default
`.env` file that has just been copied from `.env.example`.
  • Loading branch information
alagos committed Sep 30, 2024
1 parent 3dd0aa2 commit 313a9a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Custom port config
# For users who have other applications listening at 3000, this allows them to set a value puma will listen to.
PORT=
PORT=3000

# Exchange Rate API
# This is used to convert between different currencies in the app. We use Synth, which is a Maybe product. You can sign up for a free account at synthfinance.com.
Expand Down
3 changes: 0 additions & 3 deletions bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ if ! gem list foreman -i --silent; then
gem install foreman
fi

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

# Let the debug gem allow remote connections,
# but avoid loading until `debugger` is called
export RUBY_DEBUG_OPEN="true"
Expand Down

0 comments on commit 313a9a3

Please sign in to comment.