Handling Shutdown of NPM app. #6611
Closed
StefanJonssonInExchange
started this conversation in
General
Replies: 2 comments 2 replies
-
What version of aspire are you using? |
Beta Was this translation helpful? Give feedback.
0 replies
-
All Aspire nugets are 9.0.0-rc.1.24511.1 and AppHost csproj has |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm using Aspire for a project that contains a C# API. There is also a Vue frontend that is a separate repo.
In production the Vue frontend talks to this API in question. I wanted to integrate the frontend to the already existing aspire project (for local environment purposes). Here is what I did
This works pretty good and was easy to accomplish. However, when I stop debugging/close the dashboard. My API, and other services like rabbitmq, cosmos emulator etc are closed successfully. However the frontend is still running. And I can see in my Task manager that Node.js is still running, (and starting another instance on each debugging session)
The problem with this is that sometimes (very inconsistent) the entire dashboard cannot launch unless i close the node.js instances in task manager, with this exception:
Failed to bind to address http://127.0.0.1:15282: address already in use.
However, that url is to the Aspire dashboard and not the frontend application, so I'm abit confused.
Anyways. If I manually always kill node.js instances in task manager before restarting my debugging session I cannot reproduce the problem. And I can also not reproduce the problem if I comment out the vue frontend in my AppHost. So I am pretty sure the problem is that Aspire is not shutting down the frontend application.
When we debug the frontend without aspire, we start it with npm run start, and we close it by just pressing ctrl+c in the terminal.
Screenshot of package.json in frontend repo.
So my question is; Is Aspire not able to shutdown NPM apps properly, or am I doing something wrong perhaps? Would appreciate some advice here. Thanks In advance.
Beta Was this translation helpful? Give feedback.
All reactions