-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
port in parse-dashboard config.json doesn't work #2429
Comments
Thanks for opening this issue! |
@mtrezza do we even have port as config parameter inside that config file? |
It seems that |
ok i'm on the way to adding |
Great! Before you make extensive changes about it in the README, you may want to take a look at #2465. |
I'm thinking of refactoring of the file. So I want to do something like if same parameter is passed from file as well as command line arg, the command line arg should take precedence instead of throwing error like "it should be either file or CLI oprion." And also add same options to .env as well. Basically adding same options to CLI, env, and config file. And precedence order from low to high will be CLI < config file < env < default hardcoded value. Example const host = options.host || configFile.host || process.env.HOST || '0.0.0.0'; What are ur thoughts @mtrezza |
Here is my algorithm to do the same steps to get values (every step is optional in a way that we don't required the input to that step like file or env or CLI options etc, as we are not concerned with the steps but the values)
|
It sounds good, just a note... if we change the precedence order it would be a breaking change; if there is a good reason (i.e. improvement) we can have a breaking change, otherwise we try to avoid it. If the dashboard currently just crashes / throws an error and stops init when a param is set via CLI and config and env var, then I'd not consider it a breaking change. Maybe leave this open for discussion a few days, in case there is any additional input. |
I mean we are just making it clear about preceding order. It is almost exactly as it is right now. Still, I'll run through edge case myself and report here. |
Sure, it's probably unlikely that someone has the same param set in config as in CLI or env var; but if someone has it may break their deployment. So it would be interesting to know how it currently behaves in these cases. |
Enviroment: parse-dashboard 5.0.0 / parse-server 6.0.0
The port in
--config dashboard.json
doesn't work, the only way to work is give a particular port with --port:dashboard.json
I am not sure port should be place into the root or apps in dashboard.json, but it doesn't works as I have tried both.
Originally posted by @fdddf in #2113 (comment)
The text was updated successfully, but these errors were encountered: