feat: Intiial working text share

This commit is contained in:
henrik
2024-11-13 17:37:32 +01:00
commit ec80db6d09
29 changed files with 592 additions and 0 deletions

54
Pushy/Pushy/Program.cs Normal file
View File

@@ -0,0 +1,54 @@
using Pushy.Components;
using StackExchange.Redis;
using LinkGenerator = Pushy.LinkGenerator;
var builder = WebApplication.CreateBuilder(args);
builder.UseOrleans(silo =>
{
silo.UseLocalhostClustering();
silo.UseRedisReminderService(conf =>
{
conf.ConfigurationOptions = ConfigurationOptions.Parse(builder.Configuration.GetConnectionString("Valkey"));
});
silo.AddRedisGrainStorageAsDefault(options =>
{
options.ConfigurationOptions =
ConfigurationOptions.Parse(builder.Configuration.GetConnectionString("Valkey"));
});
silo.AddActivityPropagation();
});
builder.Services.AddScoped<LinkGenerator>();
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseWebAssemblyDebugging();
}
else
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Pushy.Client._Imports).Assembly);
app.Run();