Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
backend ruleP2stack specificStack: node
nodeenvnode-envconfiguration
Don't put NODE_ENV in .env; set it explicitly per script
NODE_ENV is conventionally set per-command (or overridden manually), not stored in .env, because a forgotten committed value can cause confusing, hard-to-diagnose behavior.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetext
| 1 | # .env |
| 2 | NODE_ENV=development |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejson
| 1 | // package.json |
| 2 | "watch": "NODE_ENV=development node ./scripts/watch.js" |
Explanation (EN)
Objašnjenje (HR)