myByways

the road less travelled

Hi! I’m C.Y. Wong, and welcome to my slice of the Internet!

This is primarily a record of things I’ve learnt, but maybe you’ll find something that interests you too.

Recent Posts

Prototyping with a Node-RED container

16 Apr 2019dockerregex

If the preceding posts on Node.js and MongoDB have been too complex for you, let me introduce you to a simpler drag-and-drop “flow-editor,” Node-RED.. It was developed and open-sourced by IBM, and is now hosted by the OpenJS Foundation (the same foundation that hosts projects like jQuery, and Dojo). I’ve used Node-RED for quick prototypes and demos, as it’s easy to explain each step of the flow. It saves a lot of coding effort and reduces errors buy providing built-in and pre-built third-party “nodes”.

Continue reading...

Wiring up Node.js and MongoDB containers

Previously, I described my development environment setup using Docker containers. I do it in a totally different way from most tutorials, which I don’t believe leverage containers and complicate things by having to build images for development.

Here I explain how I wire up (i.e. network) a few containers - a MongoDB database, a Mongo Express User Interface to manage the database, and a Node.js container using JSON Web Tokens (JWT) to authenticate users against the database.

Continue reading...