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

Allow specifying a custom port in appsettings.json #79

Closed
lindydonna opened this issue Mar 7, 2017 · 4 comments
Closed

Allow specifying a custom port in appsettings.json #79

lindydonna opened this issue Mar 7, 2017 · 4 comments

Comments

@lindydonna
Copy link
Contributor

lindydonna commented Mar 7, 2017

(edited with new design)

If the port is specified in appsettings but also command line, command line takes precedence. Should update the help text in port command line option to make it clear.

Add a new object "Host" where we can put multiple settings:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "",
    "AzureWebJobsDashboard": ""
  },
  "Host": {
    "LocalHttpPort": 7071
  }
}
@ahmelsayed
Copy link
Contributor

I don't know of any http server that does this, mainly for the reason that you have to know the port it's running on to interact with it. If you know that this will always be on 7071, then you don't need to worry about it. If the CLI changes the default port without explicit action, then you'd need to check which port it picked everytime. There is already a -p\--port arg to change the port.

@ahmelsayed ahmelsayed removed this from the 1.0.0.beta.94 milestone Apr 10, 2017
@ahmelsayed
Copy link
Contributor

removing milestone to triage again.

@lindydonna
Copy link
Contributor Author

@ahmelsayed Good point, but we do print out the port once we've chosen it. I guess I was thinking of web project setup in VS where it picks a port (I think randomly).

Maybe a better option is to allow customers to specify a port in appsettings.json.

@lindydonna
Copy link
Contributor Author

lindydonna commented Apr 14, 2017

If the port is specified in appsettings but also command line, command line takes precedence. Should update the help text in port command line option to make it clear.

Use a setting at the top level, peer to "IsEncrypted"

"LocalHttpPort": 7071,

@lindydonna lindydonna added this to the 1.0.0.beta.95 milestone Apr 14, 2017
@lindydonna lindydonna changed the title If port is already taken, choose a new one in func host start Allow specifying a custom port in appsettings.json Apr 20, 2017
@ahmelsayed ahmelsayed modified the milestones: 1.0.0.beta.95, 1.0.0.beta.96 May 3, 2017
@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants