React-native-windows: Provide separate dev setting for hostname and port

Created on 7 Jun 2019  ·  8Comments  ·  Source: microsoft/react-native-windows

Instead of having a single dev setting for the hostname and port together, e.g. "localhost:123", provide separate settings for "hostname" and "port". This would allow changing the port while using the default for the host name (localhost), and would be easier for tooling.

Good First Task bug nice-to-have

All 8 comments

@chrisglein is this issue open to work on?

Good question. The dupe issue here has a bit more detail: #2593, which points to the PR with the addition to devSettings as a single setting: https://github.com/microsoft/react-native-windows/pull/2585/files. So the issue seems as relevant as it was then.
@marlenecota or @stecrain speak up if I'm wrong.

In that case, we should allow configuring every segment of the URI:
scheme: http
Host: localhost
Port: 1234
Path: /

Otherwise, I don’t see a major gain on passing “5678” instead of “localhost:5678”.

For the protocol, there could be an ability to use https instead of http, and there could be a boolean to use https, but for now http as the only protocol is OK. I don't think there is a strong need for this.

The host and port are the two parts that are usually changed, and having them be independent makes it easier. For example, usually localhost is desired, but a different port wants to be used.

For the path, you could allow configuring the path, but there is not as strong of a use case. There was a use case with Office code and "web" debugging because the JavaScript bundle is copied to a different location. There is support in ReactNative Windows code for this, but it wasn't exposed in the dev settings. It isn't needed for direct debugging and therefore I don't think path really needs to be included.

@chrisglein I am getting somehow confused so is this issue open to work on? and if yes what exactly is the concern we are discussing on?

@divyanshu-rawat The only context I have is that from the PR. This was an customization ask raised in code review.

@chrisglein it means it is open to work on right?

FYI @nasadigital given Keith's comments in the linked duplicate about you already working in this area I've assigned over to you. Let us know if that sounds okay or if you have any questions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

namrog84 picture namrog84  ·  26Comments

kamalkrishna3000 picture kamalkrishna3000  ·  14Comments

nomartin picture nomartin  ·  18Comments

namrog84 picture namrog84  ·  23Comments

kmelmon picture kmelmon  ·  15Comments