tadasajon
How can I run a phoenix app on port 80 in dev mode on my local machine?
I need to get a telegram login widget working and unfortunately it only works if I run on port 80 – see this discussion to understand why: https://stackoverflow.com/a/58016947/1701170
In any case, I’m trying to get my app to run locally on port 80, which I have done by adjusting the port to 80 in my config/dev.exs file. But I’m getting an error relating to Postgres:
[error] Postgrex.Protocol (#PID<0.570.0>) failed to connect: ** (DBConnection.ConnectionError) tcp connect (localhost:5432): non-existing domain - :nxdomain
Does anyone have any idea what is going on here?
Marked As Solved
tadasajon
Ok, so I got past the Postgres problem. It turns out that when I edited my /etc/hosts file I removed this line;
127.0.0.1 localhost
Once I put that line back in and then restarted my MacBook I was successfully able to run mix ecto.reset and the Postgres connection stopped giving me problems.
The next issue was making sure I used sudo to start my dev server:
sudo mix phx.server
Popular in Questions
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









