Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active February 7, 2024 06:29
Show Gist options
  • Save gistlyn/63520f8f50160dc924444e4c10248a95 to your computer and use it in GitHub Desktop.
Save gistlyn/63520f8f50160dc924444e4c10248a95 to your computer and use it in GitHub Desktop.
Configure Server Events (SSE)
using ServiceStack;
[assembly: HostingStartup(typeof(MyApp.ConfigureServerEvents))]
namespace MyApp;
public class ConfigureServerEvents : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices(services => {
services.AddPlugin(new ServerEventsFeature());
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment