fullstackhero / blazor-starter-kit

Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
MIT License
3.48k stars 730 forks source link

Question: how to switch between Server and Wasm Modes #361

Open scharada opened 2 years ago

scharada commented 2 years ago

Hi, is there a way to switch between both modes ? or convert the code to run in server mode ? thank you.

sygmond commented 2 years ago

Did you managed to convert it to a Blazor Server Side? As far as I documented myself online, the code needs to be changed. Didn't succeed so far as Blazor is something totally new for me and to make this change are necessary quite a few changes. In principal, in a server side, the communications are done directly and not via HTTP Requests. It has defined render-mode="ServerPrerendered" and the JWT Authentication and Authorization are different or removed. These are just some findings that I still can't wrap my head around. Web is totally new thing to me :) Let me know if you have some success.

nameofSEOKWONHONG commented 1 year ago

There is no way to programmatically change the mode.

To use SPA mode in server mode, a separate SPA project must exist.

This means that the FRONT project exists separately.

The FRONT project must be hosted on the WEB API server.

Or hosted using a separate FRONT hosting service.