feat: Intiial working text share
This commit is contained in:
54
Pushy/Pushy/Program.cs
Normal file
54
Pushy/Pushy/Program.cs
Normal 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();
|
||||
Reference in New Issue
Block a user