Check how we interpret env vars
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
We might want to go through all of our products and ensure we are interpreting env vars correctly. All env vars come in as strings. That means if we are intending to have a boolean or a number, when it hits our NodeJS code, it will be viewed as a string. This causes bugs like if(whatever_boolean_from_env_var) to always interpret as true even though we say its false. It is technically true because it is not null, undefined, empty string or false (with type boolean).
Solutions to the possible types can be found in this commit:
https://github.com/bcgov/bcparks-ar-api/pull/46/files
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files or tests; start by surveying the NodeJS environment-variable entry points across the products and compare their handling with the examples in PR #46. Done means boolean and numeric variables are interpreted intentionally rather than as raw strings, with each affected product checked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100