Skip to content

Make local and remote ports configurable#84958

Merged
bpasero merged 6 commits intomicrosoft:masterfrom
SoraKumo001:vscode-web
Nov 18, 2019
Merged

Make local and remote ports configurable#84958
bpasero merged 6 commits intomicrosoft:masterfrom
SoraKumo001:vscode-web

Conversation

@SoraKumo001
Copy link
Contributor

Modification to enable handling in cases where local port and remote port are different

#RemotePort=30000 LocalPort=8080
yarn web --port=30000 --local_port=8080

@bpasero
Copy link
Member

bpasero commented Nov 18, 2019

What is the scenario to support here?

@bpasero bpasero added the info-needed Issue requires more information from poster label Nov 18, 2019
@SoraKumo001
Copy link
Contributor Author

When vscode-web was tested on vscode-online, there was a difference between the local port number and the remote address port to check from the browser during execution.
At this time, the script address output from vscode-web to the browser indicates the local port, causing a problem in operation.
This content is to deal with it.

@bpasero
Copy link
Member

bpasero commented Nov 18, 2019

Could this be documented somehow in the args?

@bpasero
Copy link
Member

bpasero commented Nov 18, 2019

Something like showing help output when running "yarn web --help"

@msftclas
Copy link

msftclas commented Nov 18, 2019

CLA assistant check
All CLA requirements met.

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, some feedback provided.

server.listen(PORT, () => {
console.log(`Web UI available at ${SCHEME}://${AUTHORITY}`);
server.listen(LOCAL_PORT, () => {
console.log(`Operating location at http://0.0.0.0:${LOCAL_PORT}`);
Copy link
Member

Choose a reason for hiding this comment

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

I would only print this if the local port is different from the remote? Otherwise a bit confusing

if(args.help){
console.log(
'yarn web [options]\n' +
' --no-launch Launch browser\n' +
Copy link
Member

Choose a reason for hiding this comment

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

I think the text is wrong, if specified this does not launch the browser, right?

console.log(
'yarn web [options]\n' +
' --no-launch Launch browser\n' +
' --scheme Potocol\n' +
Copy link
Member

Choose a reason for hiding this comment

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

Maybe Protocol (https or http)

@bpasero bpasero added this to the November 2019 milestone Nov 18, 2019
@bpasero bpasero added web Issues related to running VSCode in the web and removed info-needed Issue requires more information from poster labels Nov 18, 2019
SoraKumo001 and others added 2 commits November 18, 2019 18:33
Changed to show additional message only when local port is changed.
@bpasero bpasero merged commit 7021e20 into microsoft:master Nov 18, 2019
@bpasero
Copy link
Member

bpasero commented Nov 18, 2019

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

web Issues related to running VSCode in the web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants