Skip to content

Latest commit

 

History

History

Aspire.Hosting.Azure.WebPubSub

Aspire.Hosting.Azure.WebPubSub library

Provides extension methods and resource definitions for a .NET Aspire AppHost to configure Azure Web PubSub.

Getting started

Prerequisites

Install the package

Install the .NET Aspire Azure Web PubSub Hosting library with NuGet:

dotnet add package Aspire.Hosting.Azure.WebPubSub

Usage example

In the Program.cs file of AppHost, add a WebPubSub connection and consume the connection using the following methods:

var wps = builder.AddAzureWebPubSub("wps1");

var web = builder.AddProject<Projects.WebPubSubWeb>("webfrontend")
                       .WithReference(wps);

Additional documentation

Feedback & contributing

https://github.com/dotnet/aspire