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 Setting the Port of externalServer to a String #256

Open
a0n opened this issue Sep 13, 2022 · 1 comment
Open

Allow Setting the Port of externalServer to a String #256

a0n opened this issue Sep 13, 2022 · 1 comment

Comments

@a0n
Copy link
Contributor

a0n commented Sep 13, 2022

I have a file:
.vscode/settings.json
with the following content:

{
  "solargraph.externalServer": {
    "host": "localhost",
    "port": "${env:SOLARGRAPH_PORT}"
  },
  "solargraph.transport": "external",
}

I'd like to be able to set the Port from an ENV Variable, currently only String values can be created from ENV Variables.
But if I provide a String in the Settings the Code breaks with:

Failed to start Solargraph: RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received ${env:SOLARGRAPH_PORT}.

Could the value of "port" be casted to an integer so that this is possible?

@a0n
Copy link
Contributor Author

a0n commented Nov 7, 2022

I think there is a Problem still because the package.json#L65 enforces the port setting to be of type integer

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

No branches or pull requests

1 participant