Hi! I want to add to the supervision tree some stuff only if the server is enabled. Is
Application.get_env(:phoenix, :serve_endpoints)
the idiomatic way to check that? Or is there a more encapsulated API?
Hi! I want to add to the supervision tree some stuff only if the server is enabled. Is
Application.get_env(:phoenix, :serve_endpoints)
the idiomatic way to check that? Or is there a more encapsulated API?
This works, but there’s also a proper api:
https://hexdocs.pm/phoenix/1.5.3/Phoenix.Endpoint.html#server?/2