Skip to content

Commit

Permalink
update counter live to subscribe and boradcast msgs #1
Browse files Browse the repository at this point in the history
  • Loading branch information
RobStallion committed Jun 6, 2019
2 parents 5475eb4 + f76b725 commit 37ebe35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ config :live_view_counter, LiveViewCounterWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "oq1rRRs+4fqLuaBxIDEbrV4ALaCpglx6aEZZGKi1JiPuQt1dKKvMww2ghfxGWFFW",
render_errors: [view: LiveViewCounterWeb.ErrorView, accepts: ~w(html json)],
# https://elixirschool.com/blog/live-view-with-pub-sub/
pubsub: [name: LiveViewCounter.PubSub, adapter: Phoenix.PubSub.PG2]

# Configures Elixir's Logger
Expand Down
2 changes: 1 addition & 1 deletion lib/live_view_counter_web/live/counter_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ defmodule LiveViewCounterWeb.CounterLive do
def handle_info(msg, socket) do
{:noreply, assign(socket, msg.payload)}
end
end
end

0 comments on commit 37ebe35

Please sign in to comment.