sevensidedmarble

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

zachdaniel

Creator of Ash

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

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 :grin:). 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

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.

Where Next?

Popular in Proposals: Ideas Top

GregPhx
Greetings Everyone!!! A little bit of my background so it could be easier to understand where my comments are coming from, and to take t...
New
skyqrose
Proposal: I wish the socket connect/3 callback could allow returning a reply to the frontend, which would then be visible in phoenix.js ...
New
beno
There appears to be no way to escape whitespace in word lists, so sigil_w (and sigil_W) can only be used for lists of single words. Of co...
New
AHBruns
So, LiveView 0.20 brought an async processing API which is a thin wrapper around tasks. It’s a very nice convenience, but the main thing ...
New
cevado
IEx is a very powerfull shell and it would be awesome to have all this power integrated inside a code editor. Clojure enables something l...
New
sevensidedmarble
All the pieces are there to execute arbitrary JS commands from the server. You can put them on a data property and call them from the cli...
New
Astolfo
When generating a release with phx.gen.release --docker a debian version is used by default to avoid “DNS issues” on Alpine. It seems li...
New
pierrelegall
Problem Currently, List.first/2 and List.last/2 return a default value (or nil) when the list is empty. However, there are cases where an...
New
Matsa59
Lets start by a story, I work with a team on a pretty big CMS with lots of modules. We split the cms using umbrella apps. So we have comp...
New
zachdaniel
One thing I find is that I typically “start” with a LiveView even for static pages (in cases where I know I’m likely to add interactivity...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New

We're in Beta

About us Mission Statement