static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

Connect to a dev server using ports only (shorthand syntax)

Open manekinekko opened this issue 4 years ago • 4 comments

Describe the solution you'd like We would like to support a shorter syntax when connecting to a dev server.

Instead of asking the user to type in:

swa start http://localhost:4200 --api http://localhost:7071

We can also support:

swa start :4200 --api :7071

This would assume that these dev servers are running on http://localhost:PORT.

Specs:

  • This shorthand syntax only works for http
  • Use ":" before the port number. This would make it easier to parse.

cc @johnpapa @anthonychu

manekinekko avatar Jun 25 '21 10:06 manekinekko

Just for clarification. In this case, is only http:// supported?

horihiro avatar Jun 25 '21 11:06 horihiro

Thank you @horihiro Yes, that's correct. I will update the description.

manekinekko avatar Jun 25 '21 13:06 manekinekko

@manekinekko if some user wants to connect using only ports, he can connect using the flags --port and --api-port right? Is this functionality really necessary? Just a thought from my side.

sgollapudi77 avatar Jul 15 '21 09:07 sgollapudi77

--port and --api-port are used to set the static server port and API server port started by the CLI. There are not used for dev server.

manekinekko avatar Jul 15 '21 10:07 manekinekko