Packages

Live error monitoring to watch your Phoenix app going up in flames in real time! Open source version of error aggregation services. Hooks into Elixir's Logger to provide accurate error reporting all throughout your application.

Current section

Files

Jump to
flames lib flames_web web.ex
Raw

lib/flames_web/web.ex

defmodule Flames.Web do
@moduledoc false
@doc false
def html do
quote do
@moduledoc false
use Phoenix.Component
unquote(view_helpers())
end
end
@doc false
def live_view do
quote do
@moduledoc false
use Phoenix.LiveView
unquote(view_helpers())
end
end
@doc false
def live_component do
quote do
@moduledoc false
use Phoenix.LiveComponent
unquote(view_helpers())
end
end
defp view_helpers do
quote do
# Use all HTML functionality (forms, tags, etc)
use Phoenix.HTML
# Import convenience functions for LiveView rendering
import Phoenix.LiveView.Helpers
# Shortcut for generating JS commands
alias Phoenix.LiveView.JS
# Import dashboard built-in functions
import Flames.Dashboard.Helpers
end
end
@doc """
Convenience helper for using the functions above.
"""
defmacro __using__(which) when is_atom(which) do
apply(__MODULE__, which, [])
end
end