AgileVentures / sing_for_needs

Prototype
4 stars 12 forks source link

Add PORT number to .env #62

Closed aonomike closed 5 years ago

aonomike commented 5 years ago

Expected Behavior

Add application PORT number to .env file so that it can be set dynamically

Current Behavior

The application number is set to a static value of 4000

Possible Solution

Update the config file to read the port number from environmental variables

config :sing_for_needs, SingForNeedsWeb.Endpoint,
  http: [port: ({:system, "PORT"} || 4000)],
.
.
.

Context (Environment)

If you have something else running in port 4000, you will always get an error when you run mix phx.server with the current set up [error] Failed to start Ranch listener SingForNeedsWeb.Endpoint.HTTP in :ranch_tcp:listen([cacerts: :..., key: :..., cert: :..., port: 4000]) for reason :eaddrinuse (address already in use)