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

Discrepancy of environment variable names (SERVER vs APP) #71

Open
JKRhb opened this issue Dec 14, 2023 · 1 comment
Open

Discrepancy of environment variable names (SERVER vs APP) #71

JKRhb opened this issue Dec 14, 2023 · 1 comment

Comments

@JKRhb
Copy link
Contributor

JKRhb commented Dec 14, 2023

The .env, test.env, and README.md files refer to an environment variable called ZION_SERVER_PORT for configuring the port the Zion server should listen on:

ZION_SERVER_PORT=3000

zion/.env

Line 3 in 5b03e3e

ZION_SERVER_PORT=3000

zion/README.md

Lines 66 to 67 in 5b03e3e

# ZION_SERVER_PORT specifies the port number on which the Zion server will listen for incoming requests.
ZION_SERVER_PORT=3000

However, in the codebase itself, this environment variable is apparently not being used and instead, the AppConfig tries to use the variables ZION_APP_HOST and ZION_APP_PORT instead:

host: this.nestConfigService.get('ZION_APP_HOST', Default.app.host),
port: this.nestConfigService.get('ZION_APP_PORT', Default.app.port),

Is this correct or should ZION_APP_HOST and ZION_APP_PORT be changed to ZION_SERVER_HOST and ZION_SERVER_PORT here (or vice versa)?

@JKRhb JKRhb changed the title Discrepancy of environmental variable names (SERVER vs APP) Discrepancy of environment variable names (SERVER vs APP) Dec 14, 2023
@relu91
Copy link
Contributor

relu91 commented Dec 14, 2023

Thank you for the report, I'm actively working on revolutionizing the configuration process. You can see a short of status in the configuration branch. I wanted to close it fast but I went down the white rabbit hole and now it got out of hand. But once finalized we will have a single source of truth with the configuration parameters that can be passed by:

  • CLI
  • ENVs
  • Config files (JSON, YAML, or toml).

Ofc, once I finish I'll update the README accordingly (we can generate the env example automatically).

See #25 .

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

2 participants