React SSR Deep(ish) look

Today, I looked into the React SSR sample code. (Kudos to Dan and team for the sophisticated user-land experience, btw). What stroke my curiosity was the <!DOCTYPE html> token at the start of the server response HTML payload: Why was I curious, you ask? Cuz at no point in the codebase do we explicitly write […]

Read More React SSR Deep(ish) look

TypeScript Node.js testing tips

Situation 1 Use mocha in server-side TypeScript projects with compilerOptions.paths in tsconfig.json ? Then we need: mocha tsconfig-paths ts-node { “ts-node”: { “files”: true } } in the tsconfig.json file (see more here) Depending on how we import our modules around in the codebase, point (4) above may not always be needed. In one of […]

Read More TypeScript Node.js testing tips

make a string url-safe

When running devops scripts (among other things), we often need to get a url-safe representation of an arbitrary string. This is commonly known as “url slug” by the average netizens. As my JavaScript is better than my bash, and npx is more universally available than my capability to master both Windows and Linux shell scripts, […]

Read More make a string url-safe

Explain SPF like I’m 12

Say, you have just registered your own domain name: “myawesomedomain.com”, and a geek friend of yours says “hey pal, you’ll need to pay someone, or set up your own server, to send emails out from that awesome domain. Lemme do it for you!”

Read More Explain SPF like I’m 12