A quick guide on how to set up a GitHub actions workflow to publish a npm package including the provenance badge and section on npmjs.com.
NodeJS
Integrating GCP Secret Manager with App Engine environment variables
Showing a convenient way on how to use Secret Manager to securely pass sensible data as environment values to Google App Engine (GAE) services running with Node.js.
Secure configuration management for a GCP cloud function in Node.js
Creating a convenient and production-grade configuration management for a GCP cloud function in Node.js using Secret Manager and the secure-config package. Includes a complete example project on GitHub.
Default Node.js process.env variables in GCP cloud functions and app engine
Discovering the default process.env
variables provided in cloud functions and app engine services on Google Cloud Platform covering Node.js 16, 18 and 20 as well as Gen1 and Gen2 functions. Including a simple project for retrieving the values.
CommonJS vs. ESM/ECMAScript cheat-sheet
Short comparison of the most common statements in CommonJS vs. ESM/ECMAScript for importing, exporting and in your package.json.
Destructuring nested object properties in JavaScript
Quick tutorial on how to use destructuring for accessing nested JavaScript object properties.
Express: passing dates in an URL using route parameters including regex validation
Showing an elegant way on passing dates to your REST API’s and webservices using Express route parameters and regex validation standard features.
Full code-coverage with Jest
A guided tour on how to achieve the most complete code-coverage with Jest in your NodeJS projects and an some thoughts on why this is not necessarily the primary target.
npm major package upgrades with backward patch support
A short checklist for publishing new major versions of your packages in the npm registry including support for patching older versions.
Testing process.exit with Jest in NodeJS
Demonstrating a pragmatic way on how to test code paths resulting in process.exit
using the Jest test library.