Skip to content

Instantly share code, notes, and snippets.

View tmjoen's full-sized avatar
🔥

T. Mjoen tmjoen

🔥
  • Bielke&Yang
  • Oslo, Norway
View GitHub Profile
# in your app supervisor
:phx_dyn_dispatch = :ets.new(:phx_dyn_dispatch, [:named_table, :bag, :public])
defmodule DynamicDispatch do
def register(group, plug, opts) do
true = :ets.insert(:phx_dyn_dispatch, {group, plug, opts})
end
def unregister(group, plug) do