Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shankardevy/phoenix-pubsub-postgres
Postgresql PubSub adapter for Phoenix apps
https://github.com/shankardevy/phoenix-pubsub-postgres
Last synced: 3 months ago
JSON representation
Postgresql PubSub adapter for Phoenix apps
- Host: GitHub
- URL: https://github.com/shankardevy/phoenix-pubsub-postgres
- Owner: shankardevy
- Created: 2015-03-21T06:19:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-02T08:17:12.000Z (over 9 years ago)
- Last Synced: 2024-10-27T17:28:08.483Z (3 months ago)
- Language: Elixir
- Homepage: http://pgchat.opendrops.com
- Size: 190 KB
- Stars: 27
- Watchers: 6
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Postgresql PubSub adapter for Phoenix apps. (Framework Components)
- fucking-awesome-elixir - phoenix_pubsub_postgres - Postgresql PubSub adapter for Phoenix apps. (Framework Components)
- awesome-elixir - phoenix_pubsub_postgres - Postgresql PubSub adapter for Phoenix apps. (Framework Components)
README
PhoenixPubSubPostgres
=====================This package provides postgres adapater for [Phoenix](http://github.com/phoenixframework/phoenix)'s Pub/Sub channels.
Demo
---
Open pgchat.opendrops.com in two different browsers windows and start sending some messages. The message passing is handled by postgres's built-in [pubsub support] (http://www.postgresql.org/docs/9.1/static/sql-notify.html)Demo app source
--------------
Source code of the demo app is available at http://github.com/opendrops/pgchat-demo-app-
How to use
---------Add phoenix_pubsub_postgres to your mix deps
defp deps do
[{:phoenix, github: "phoenixframework/phoenix", override: true},
{:phoenix_pubsub_postgres, "~> 0.0.2"},
{:postgrex, ">= 0.0.0"},
{:cowboy, "~> 1.0"}]
endTo use Postgres as your PubSub adapter, simply add it to your Endpoint's config and modify it as needed.
config :my_app, MyApp.Endpiont,
...
pubsub: [name: MyApp.PubSub,
adapter: PhoenixPubSubPostgres,
hostname: "localhost",
database: "myapp_db_env",
username: "postgres",
password: "postgres"]