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.
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.
Commander options hands-on – advanced CLI’s with NodeJS
The Commander package is a great utility for building a CLI with NodeJS. This article provides a comprehensive hands-on for the various option features of Commander.
Express: middleware function with custom parameters
Implementing an Express middleware function that can handle custom parameters.
CI/CD with GitHub actions for NodeJS with Coveralls
10-minutes setup guide for building a NodeJS repo including Coveralls test stats. No need for Travis any more.
NodeJS: migrate from deprecated Request package to Got
OMG!!! The Request package is deprecated… some tips beyond the docs and migration guide when moving to Got.