A practical end-to-end guide for migrating an existing .eslintrc.json
config (ESLint v8 and before) to the new flat file config eslint.config.js
(ESLint v9 and above) in a CommonJS Node.js project including linting of unit-tests with Jest.
NodeJS
Built and signed on GitHub Actions – publishing npm packages with provenance statements
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.
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.
Convert an existing NodeJS project from CommonJS to ESM / ECMAScript
A quick guide for converting your existing NodeJS projects from CommonJS to ESM/ECMAScript. Including Express, Jest, Supertest and ESLint.
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.