Skip to content

Commit

Permalink
log host and IP at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewhrit committed Aug 22, 2024
1 parent 4b85d64 commit f00db00
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/redeyes/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ defmodule Redeyes.Application do

use Application

IO.puts("Starting Redeyes application")

@impl true
def start(_type, _args) do
IO.puts("Starting Redeyes application")

IO.puts(
"Listening at http://#{System.get_env("REDEYES_HOST", "127.0.0.1")}:#{Application.fetch_env!(:redeyes, :port)}"
)

children = [
Plug.Cowboy.child_spec(
scheme: :http,
Expand All @@ -20,9 +24,5 @@ defmodule Redeyes.Application do

opts = [strategy: :one_for_one, name: Redeyes.Supervisor]
Supervisor.start_link(children, opts)

IO.puts(
"Started application at #{System.get_env("REDEYES_HOST", "127.0.0.1")}:#{Application.fetch_env(:redeyes, :port)}"
)
end
end

0 comments on commit f00db00

Please sign in to comment.