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

Gladear
Hello everyone! tldr; I propose to add a way for VerifiedRoutes to know if they’re used for get, post, etc to make them even more robust...
New
sezaru
When writing my code, I always find __MODULE__ very useful to use as alias of that module “inner dependencies”, ex: alias __MODULE__.{Im...
New
mssantosdev
Hey, everyone. I’ve been working with Phoenix Components for a few weeks, and they are great. One thing I use a lot when building custom...
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
ffloyd
The Problem Currently, if I define a struct in the following way: defmodule MyStruct do # Both x and y will have the FIXED values unti...
New
markevans
Hi! I’m excited about everything that’s going on re. gradual typing and am really pleased to see that Jose and the team seem to be think...
New
bartblast
This could resolve to {[a: 1, b: 2]}. Was it ever considered to allow such syntax? Notice this: {:abc, a: 1, b: 2} and this: my_fun(:abc,...
New
altdsoy
Hi there :wave:, I hope everyone is doing well… Tl;Dr: Is there a use case to have Heroicons from an actual hex.pm package instead of G...
New
dibok
Hi, I’m trying to use phoenix.js in my Qt QML project which has it’s own buildin JavaScript engine. Problem is that (what I googled so f...
New
alaadahmed
Hi folks, I tried Phoenix 1.7 and it is awesome, but I have small suggestion, which in my opinion will organize files in a better way. ...
New

Other popular topics Top

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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement