1

I have a problem and wonder how to solve it. However, due to unclear solution, I'm pretty sure that the formulation will be considered as making slacking off, making others do my job. So is not the case. I'm not lazy. Just ignorant of the correct approach.

I have a working API in C#. I also have a working Angular app. Recently, we were told that this app is supposed to be served as a part of the API. So, the solution now is that whenever I execute ng build, the transpilation produces my scripts into wwwroot. As the API starts, the browser will look for index.html (as configured by ass.UseFileServer().

The thing is that I want the hot reload I enjoy when running ng serve and altering the files. Since the stupid API is running on another port than the served app, I can't do that. I have to re-build for each change, which isn't that fun.

Since I can't restart the project from scratch, I have to find a quicky. Worst case scenario, I'll have to keep rebuilding like a crazy monkey. Googling this, gave me not much clarity as the approach is not that common.

I want to ask for advise on how to enable the hot reload for my app while serving the Web API. Or, at least, a clear indication that this can't be done.

How can I formulate such a question?!

4
  • How about you leave out the "How can I formulate such a question?!" and ship it?
    – cafce25
    May 29 at 13:06
  • Leave out the word "stupid" though. I'm also more afraid that without code/configuration, this question is not going to do well. But it's a javascript related question so I can't be sure of that. Different subculture than what I'm used to.
    – Gimby
    May 30 at 8:00
  • @cafce25 What do you mean by ship it? Is it a typo and the intended spelling was skip it? I don't follow. If you're suggesting that I should just post the question, well... I sense that it's not going to be well received (due to trigger-happy users assuming that lack of code is an proof, not indication, of lack of effort). Jun 1 at 6:02
  • @Gimby I agree... It's like those two worlds collide - .NET with its philosophy and Angular with its own. I'm almost certain I saw that being done once but I can't get in contact with that person. And it bugs me so much... :) Jun 1 at 6:04

0

You must log in to answer this question.

Browse other questions tagged .