Skip to content

holobeat/broadcast-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Broadcast Demo

Basic example of PubSub broadcast in Phoenix.

The app cycles though a list of fruits stored in Sqlite database. Each button press fetches the next fruit. All subscribers are notified after each request. If the request reaches the end of list, it will start again with the first item.

Start with mix setup, which gets the dependencies and sets up the database.

Then run mix phoenix.server to start the web server.

Open web browser with url localhost:4000/demo and type in random name in the Name field. Open additional browser instances and enter different names. When FETCH FRUIT button is pressed, all other clients (subscribers) are notified.

demo image

About

Basic example of PubSub broadcast in Phoenix.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published