An agnostic framework PHP library for realtime.
PHP >= 5.5
Redis Server
NodeJS >= 6
composer require adminweb/resonance
Install the Resonance server
Start the Resonance server in background with forever or PM2.
Implements the Resonance\BeatInterface
on your classes on your app.
Create a new Bell instance for use touch (method) your beat (implements BeatInterface) (like example folder).
Put a tg script with src attribute with value http://server-address:server-port/socket.io/socket.io.js
.
Initialize the connection with
var conn = io.connect('http://server-address:server-port/your-channel');
conn.on('your-event',function(music){
console.log('your music', music)
});
Be happy =D