0
votes

I'm learning of how to build microservices architecture system using Azure Service Fabric.

So, this is what I did:

  1. Installed VS 2019
  2. Created Azure Service Fabric Project
  3. Created Web Api Core stateless microservice that retrieves some data under that Azure Service Fabric
  4. Created ASP.NET Core + Angular client (using corresponding VS project template) under that Azure Service Fabric
  5. Client from #4 is very basic angular client that shows data provided by service from #3
  6. Installed Service Fabric Local Cluster Manager to be able to publish the service fabric and test all that locally
  7. I'm using Visual Studio to publish that Azure Service Fabric (with those two related services) to that local service fabric cluster node
  8. Everything is pretty ok, I can access the Angular client and see data that it gets from api

Expected result: Whenever I made changes to Angular client I want these changes to be automatically immediatelly reflected on the browser (as this typically the case when you work with Angular and it's CLI with ng serve command).

Actual result: To see how the client looks like after my changes I have to:

  1. Clean Azure Service Fabric project in VS
  2. Rebuild Azure Service Fabric project in VS
  3. Publish (ctrl+f5) Azure Service Fabric project in VS

which is frustrating.

The question: Can I get the expected result? Am I doing something wrong or is it just unsupported? Where should I look into to investigate the root cause or/and fix the problem?

Thank you in advance.

P.S. I'm pretty new to Angular and all this stuff so in case other information is needed let me know.

1

1 Answers

1
votes

I do not think you can achieve this as your local version is running locally and the changes you are making are independent from the ones in the service fabric. You would need to publish each time.

On a side note. You can use HMR in your local angular development to speed up the process, and run locally the services you published the result will be the same. Or point to those services you published from your local angular app thus you will work with services that are in service fabric and your local angular version, this will update then on each change.

On top of that, you can try kubernetes and docker.