Skip to content

pap/ws_pub_sub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

WsPubSub

** Example application for my blog post on the use of Elixir websockets + Redis PubSub **

You need Mongo and Redis running.

The application assumes the following default values

Mongo:

  • host: 127.0.0.1
  • port: 27017
  • database: MyDb
  • collection: MyCollection

Redis:

  • host: 127.0.0.1
  • port: 6379

You will find the elixir application in ws_pub_sub dir and i will soon finish an example bullet.js webpage at webpage dir

You can use python -m SimpleHTTPServer command to serve this webpage at http://localhost:8000

If you want to see some JSON getting into your browser open redis console (redis-cli) and enter PUBLISH "my_channel" "{\"recipients\":[\"00721b2a-046c-4ecc-a5df-5f808cc6c58f\"],\"data\":{\"entry\":{\"id\xe2\x80\x9d:\xe2\x80\x9d123\xe2\x80\x9d,\xe2\x80\x9dcomments\":0,\"tags\":0}}}"

About

Elixir App + Sample Webpage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published