Skip to content

A package to interact with Azure Web PubSub Service

License

Notifications You must be signed in to change notification settings

PDERAS/azure-pubsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An Azure Web PubSub Package

This package provides the backend features required to broadcast with Azure's PubSub Service

Installation

Add repository to composer.json

    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:PDERAS/azure-pubsub.git"
        },
    ]

Install via composer

composer require pderas/azure-pubsub

Configuration

In .env

PUBSUB_KEY="your-pubsub-key"
PUBSUB_ENDPOINT="https://your-service-name.webpubsub.azure.com"

BROADCAST_DRIVER=azure

The keys and endpoint can by found in your Azure PubSub portal under the Keys setting Azure portal screenshot

Configure broadcasting

// config/broadcasting.php
return [
    'default' => env('BROADCAST_DRIVER', 'azure'),

    'connections' => [
        'azure' => [
            'driver'    => 'azure-broadcaster',
            'key'       => env('PUBSUB_KEY'),
            'endpoint'  => env('PUBSUB_ENDPOINT'),
            'expiry'    => env('PUBSUB_EXPIRY', 3600),
        ],
];

Client Configuration

A separate package can be found here for front-end usage: https://github.com/PDERAS/azure-pubsub-client

About

A package to interact with Azure Web PubSub Service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages