Node.js interview questions
Show answer
Read them from environment variables or a secrets manager, never hard-code or commit them. Keep a
.env.examplewith names only, add.envto.gitignore, validate required variables at start-up, and never send server-only keys to the browser. Rotate a key immediately if it leaks.