danroth27 / BlazorDualMode

A Blazor app setup for server-side hosting in development and client-side hosting in production
MIT License
21 stars 5 forks source link

Still 2 code paths with Client/Server #1

Open aherrick opened 5 years ago

aherrick commented 5 years ago

Would love to be able to support Server side for debugging and client side for Production without having to have 2 code paths.

Additionally with this model how do debug the client side code when running in development?

I want my Blazor App + MVC to run on 1 App Service regardless of Client/Server side Blazor.

ebekker commented 5 years ago

There is a bit of plumbing code that is distinct between the client and server modes, namely the controller that makes the Weather Service impl available in client mode, but otherwise the code functions the same.

This is unavoidable, as you can't access server-side resources any other way (such as DB access or service calls that are server-side only).