Repository navigation
hizli baslangic
Ferdi ÜNAL edited this page Jan 25, 2026
·
3 revisions
git clone https://github.com/ferdiunal/soketi.rs.git
cd soketi-rs
docker-compose up -dopen http://localhost:3000// Soketi'ye bağlanın
const pusher = new Pusher('app-key', {
wsHost: 'localhost',
wsPort: 6001,
forceTLS: false
});
// Kanala abone olun
const channel = pusher.subscribe('my-channel');
// Olayları dinleyin
channel.bind('my-event', (data) => {
console.log('Alındı:', data);
});channel.bind('message', (data) => {
displayMessage(data.user, data.message);
});channel.bind('notification', (data) => {
showNotification(data.title, data.body);
});const presence = pusher.subscribe('presence-room');
presence.bind('pusher:member_added', (member) => {
console.log('Kullanıcı katıldı:', member.info.name);
});config.json dosyasını düzenleyin:
{
"host": "0.0.0.0",
"port": 6001,
"app_manager": {
"driver": "Array",
"array": {
"apps": [{
"id": "app-id",
"key": "app-key",
"secret": "app-secret"
}]
}
}
}