Closed ErikApption closed 7 months ago
@ErikApption Thank you for your feedback! I'm considering supporting Blazor Server, but I've not achieved that because I don't have enough time to implement everything! (This is one of my hobby projects 😅) Anyway, I'll challenge myself to add support for Blazor Server by the end of this year.
By the way, there are some limitations, but the Blazing Story can work on the Blazor Server app with some instructions even now.
BlazingStory
preview NuGet package to the Blazor Server project.HttpClient
as a DI service at the Program.cs
of the Blazor Server project, like this:
var serverUrl = builder.Configuration[WebHostDefaults.ServerUrlsKey]?.Split(';').FirstOrDefault() ?? "http://localhost:5000";
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(serverUrl) });
render-mode
attribute settings of the <component>
tag helpers in the Pages/_Host.cshtml
file from the ServerPrerendered
to the Server
.Pages/_Host.cshtml
file with a new name Pages/_IFrame.cshtml
.<link rel="stylesheet" href="{Project Name}.styles.css" />
in the Pages/_Host.cshtml
file.@page "/"
directive to @page "/iframe.html"
in the Pages/_IFrame.cshtml
file.I attached the whole of the sample code below.
The current limitations I've noticed are the following list.
render-mode
from ServerPrerendered
to Server
.)JSDisconnectedException
exceptions will be thrown. (Luckily, it is no problem. Just noise.)I hope the above information will be helpful for you for a while.
@jsakamoto this is fantastic!
I'd love to help out with this, what were your thoughts on next steps?
@yjmrobert, I'm really sorry to respond late to this issue. I was doing other priority stuff. However, I may be able to start implementing Blazor Server support on Blazing Story. So, I updated the project item below today.
https://github.com/users/jsakamoto/projects/1/views/1?filterQuery=server&pane=issue&itemId=23125917
Currently, I am still trying to decide what I should ask for your help, but if I come up with any ideas, I'll contact you. Thank you for your contributions!
@ErikApption @yjmrobert Blazing Story now officially supports the Blazor Server deployment model.
Please check out the latest preview version, preview 32.
@jsakamoto that's awesome! You should set up the sponsor stuff 😉
We have several projects that have some coupling with server-side libraries (yes I know it is an architecture crime) and integrating BlazingStory has been more difficult than expected. Any plans to create a server-side version of BlazingStory? As alternative, we are considering setting up Story Book with a blazor server but was wondering if anyone has figured other solutions.