vaimee / zion

A scalable Thing Description Directory
Apache License 2.0
17 stars 4 forks source link

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

Open JKRhb opened 9 months ago

JKRhb commented 9 months ago

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:

https://github.com/vaimee/zion/blob/5b03e3e680969e906b7bf4e0197e967d1dc11e20/test.env#L2

https://github.com/vaimee/zion/blob/5b03e3e680969e906b7bf4e0197e967d1dc11e20/.env#L3

https://github.com/vaimee/zion/blob/5b03e3e680969e906b7bf4e0197e967d1dc11e20/README.md?plain=1#L66-L67

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:

https://github.com/vaimee/zion/blob/5b03e3e680969e906b7bf4e0197e967d1dc11e20/src/config/config.service.ts#L24-L25

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)?

relu91 commented 9 months ago

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:

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

See #25 .