8000 GitHub - seanpowell/realtime: Listen to your to PostgreSQL database in realtime via websockets
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

seanpowell/realtime

 
 

Repository files navigation

Supabase Realtime

Listens to changes in a PostgreSQL Database and broadcasts them over websockets.

Status

Status: ALPHA

This repo is still under heavy development and the documentation is still evolving. You're welcome to try it, but expect some breaking changes.

Docs

Docs are a work in progress. Start here: [https://supabase.io/docs/realtime/introduction]

Example

import { Socket } = '@supabase/realtime-js'

var socket = new Socket(process.env.SOCKET_URL)
socket.connect()

// Listen to all changes in the database
var allChanges = this.socket.channel('*')
  .join()
  .on('*', payload => { console.log('Update received!', payload) })

// Listen to all changes from the 'public' schema
var allChanges = this.socket.channel('public')
  .join()
  .on('*', payload => { console.log('Update received!', payload) })

// Listen to all changes from the 'users' table in the 'public' schema
var allChanges = this.socket.channel('public:users')
  .join()
  .on('*', payload => { console.log('Update received!', payload) })

Contributing

We welcome any issues, pull requests, and feedback. See https://supabase.io/docs/-/contributing for more details.

License

This repo is liscenced under Apache 2.0.

Credits

About

Listen to your to PostgreSQL database in realtime via websockets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 80.4%
  • JavaScript 12.8%
  • Makefile 2.7%
  • PLpgSQL 2.5%
  • HTML 1.1%
  • Dockerfile 0.4%
  • Shell 0.1%
0