Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
Read process.env values, parse them into the required types, and reject missing or invalid configuration early.
Environment variable values are generally strings; a missing entry reads as undefined. For example, validate a port as an integer in an allowed range rather than assuming Number(process.env.PORT) always produces a usable result. A value of "false" is a non-empty truthy string, not Boolean false. Keep secrets out of source control and avoid logging configuration indiscriminately.