Build HTTP APIs with routing, middleware, validation, controllers, and error handling.
Lessons
Store passwords as salted hashes, never as plain text.
Hashing Passwords with bcrypt is easiest to learn by reading the example, changing it, and observing the result.
// npm install bcrypt
import bcrypt from 'bcrypt';
const hash = await bcrypt.hash('user-plain-password', 12);
console.log('Store this, never the plain text:', hash);
const ok = await bcrypt.compare('user-plain-password', hash);
console.log('Password matches:', ok);Practice the Hashing Passwords with bcrypt example in a small scratch file, then explain what changed and why.