Separate phoenix server(+ LiveView) for tools such as dashboard, notes, bin etc.
MIT License
Internally called Accumulator
Requires: Elixir, PostgresSQL.
This application uses PostgresSQL. You can either install it manually or through docker. If the port is different, you need to make changes to the config/dev.exs
file.
To start your Phoenix server:
mix setup
to install and setup dependenciesmix phx.server
or inside IEx with iex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
All the data is stored on Postgres. The first render shows dummy data. As soon as liveview connection is established, we fetch data from postgres, and current user on the website count(using Presence) and update the client. Liveview also subscribes(through Phoenix PubSub) to a particular topic(with "update:" prefix) to get some updates.
Whenever data is updated(a new user visits my website/blog), we send a pubsub message to a that "update:" topic. The liveview gets a message on this topic, fetches latest data from redis and presence count, and updates the liveview.
High overview on how everything fits together: