application.ex (386B)
1 defmodule Mint.Application do 2 @moduledoc false 3 use Application 4 5 def start(_type, _args) do 6 persistent_term = 7 Code.ensure_loaded?(:persistent_term) and function_exported?(:persistent_term, :get, 2) 8 9 Application.put_env(:mint, :persistent_term, persistent_term) 10 11 opts = [strategy: :one_for_one, name: Mint.Supervisor] 12 Supervisor.start_link([], opts) 13 end 14 end