Articles
Puppeteer setup for NodeJS
Puppeteer is a headless browser with which NodeJS can interact to automate web pages manipulation.
Publish a module to NPM
This article is based on <a href="https://www.freecodecamp.org/news/how-to-make-a-beautiful-tiny-npm-package-and-publish-it-2881d4307f78/" rel="noopener noreferrer nofollow">this publiation</a>.
NodeJS modules
A JavaScript file can be imported as a module into another file using the <code>require</code> command. For example, he file myPackage.js can be imported as so:
NodeJS app dockerization
NodeJS apps can be containerized using the <code>docker build</code> command. This article is based on <a href="https://nodejs.org/de/docs/guides/nodejs-docker-webapp/" rel="noopener noreferrer nofollow">this guide</a>.
Node.js testing for multiple environment variables
Some applications might require the same codebase to be tested with different sets of environment variables. This article proposes a simple way to do so.
Node.js DevOps example
In this article, we’ll build a simple Node.js application that uses Express to respond to HTTP requests. In order to deploy this application to production, we’ll also configure a GitLab CI/CD pipeline so as to dockerize it and deploy its container to a Kubernetes cluster.
Multi-user MQTT platform
Mosquitto is usually the first candidate to come to mind when looking for an MQTT broker. However, by default, Mosquitto manages users using a password file. This makes it difficult to easily add or remove users, especially when the broker is deployed in Kubernetes.
Mongoose bulkWrite upsert
Here is a code snippet for a bulk update with upsert using Mongoose:
LINE Bot
<p>LINE offers an API to developers looking into creating chat bots. I created my own so that I could send myself notifications.</p>
IoT Current consumption monitoring system
When you don't know how much power your air conditioner draws, it's easy to leave it running without feeling too guilty. And then the electricity bill comes...