Blazor & WASM in combination to get statistics from Spotify API for performing the song analysis. With separate microservices for auth, Spotify, user data tracking, and application, connected through gRPC with Polly.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Program.cs 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using IdentityProvider.Services;
  2. using ProtoBuf.Grpc.Server;
  3. var builder = WebApplication.CreateBuilder(args);
  4. // Additional configuration is required to successfully run gRPC on macOS.
  5. // For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
  6. builder.Services.AddControllersWithViews();
  7. builder.Services.AddRazorPages();
  8. builder.Services.AddEndpointsApiExplorer();
  9. builder.Services.AddGrpc();
  10. builder.Services.AddCodeFirstGrpc();
  11. builder.Services.AddCodeFirstGrpcReflection();
  12. var app = builder.Build();
  13. // Configure the HTTP request pipeline.
  14. if (app.Environment.IsDevelopment())
  15. {
  16. app.UseWebAssemblyDebugging();
  17. }
  18. else
  19. {
  20. app.UseExceptionHandler("/Error");
  21. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
  22. app.UseHsts();
  23. }
  24. app.UseHttpsRedirection();
  25. app.UseBlazorFrameworkFiles();
  26. app.UseStaticFiles();
  27. app.UseRouting();
  28. app.UseGrpcWeb();
  29. app.MapRazorPages();
  30. app.MapControllers();
  31. //app.MapGrpcService<WeatherService>();
  32. app.MapGrpcService<AuthService>().EnableGrpcWeb();
  33. app.MapCodeFirstGrpcReflectionService();
  34. app.MapFallbackToFile("index.html");
  35. app.Run();