Quick tutorial on how to use destructuring for accessing nested JavaScript object properties.
tsmx-dev
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.
Moving MongoDB from local installation to Docker – Fedora migration guide
Complete guide for moving an existing local MongoDB installation to newer versions of Fedora using Docker. Also useful if you are looking for getting a MongoDB container up & running on Linux with locally hosted data.
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.
Query min/max values with additional non-grouped fields in MongoDB
Practical example demonstrating how to query for min/max values of grouped documents in MongoDB including additional non-grouped field values using $push
, $map
and $filter
aggregation operators.
MongoDB: add/update fields referencing other existing fields using aggregation pipelines
Short explanation on how to add or update fields in documents referencing the values of other already existing fields by leveraging the aggregation pipeline framework.
Connecting from a Docker container to a local MongoDB
A quick guide demonstrating how to connect to a local MongoDB instance from a Docker container.
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.
Creating a time series sample CSV file with a bash script
Demonstrating a pragmatic way for generating time series sample data in CSV files with a bash script. Useful for Proof-of-Concepts, unit and performance testing and many other scenarios.
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.