Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(core): kill 8080 port before serving vue files #5107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivikash
Copy link
Member

@ivikash ivikash commented Jun 5, 2024

Problem

AWS Toolkits and Amazon Q extension expects the web view to be served at 8080 port. When there is a existing process, vue process starts at 8081 and so on ports. When this happens, webview doesn't always serve the latest code hampering developer productivity.

Solution

  • Kill the process and free up 8080 port before starting serveVueCore process. This ensures webview is always served on port 8080.
  • kill-port in cross platform.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ivikash ivikash requested a review from a team as a code owner June 5, 2024 20:19
@@ -4069,6 +4069,7 @@
"immutable": "^4.3.0",
"js-yaml": "^4.1.0",
"jsonc-parser": "^3.2.0",
"kill-port": "^2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a devDependency, it's not necessary for the production build.

But not sure this is worth adding a dependency for. Can we choose a different port instead of 8080? Killing the "port" seems wrong. Why isn't the task that we started being killed properly?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the Vue server process doesn't get killed isn't clear. It just happens to not stop sometimes. This has sometimes happened with the web mode server as well. So I think we can reuse this there as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants