Skip to content

Conversation

@gilbertbw
Copy link

Add a warning if you run mix phx.sever but have set sever: false in Endpoint. Without this change you get no output when running mix phx.server is this scenario.

Also document this.

Copy link
Contributor

@SteffenDE SteffenDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there might be multiple endpoints, let's move the warning to the init function where we also have the module:

    server? = server?(conf)

    if not server? and Application.get_env(:phoenix, :serve_endpoints, false) do
      # warn if mix phx.server is used but server is explicitly set to false
      Logger.warning(
        ":server is set to :false in your endpoint configuration for #{inspect(mod)}, so the server will not be started"
      )
    end

Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants