sevensidedmarble
The default generated `config/dev` file should read PORT at compile time
I have a very simple suggestion:
the generated config/dev.exs file should read from PORT at compile time to set the endpoints port.
If we did this, people making a new Phoenix app could just run:
PORT=6000 mix phx.server to change the default port. As it is this doesn’t work cause the runtime file takes over. Unless someone has a better suggestion for how to acheive this?
Most Liked
zachdaniel
Wouldn’t reading PORT at compile time do the opposite of what you’re saying? I’d have to recompile my app to run it on a new port.
sodapopcan
Adding a -p option to mix phx.server would also be an option (and more convenient for those of us who override our caps lock key
). I’m sure that must have come up some time in the past 10 years but I never read any of the discussion if it has. I’ve always thought it strange that there’s not a both obvious and super-convenient way to do this.
sevensidedmarble
Yeah I suspect the proper answer here is actually changing runtime.exs to pull the setting of the port out of the prod section, and then removing the port setup from dev.exs.
Popular in Proposals: Ideas
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








