curl-jq

Consuming Web API JSON Data Using curl and jq

Hey everyone! I decided to put a few extra batteries in the background color of the article image above. 🙂 I’m actually pretty charged up about our topic today, particularly about jq, which is a lightweight and flexible command-line JSON processor with “batteries included”.

Share
Node emoji

Add Emoji to your Node Projects with node-emoji ✨

Attention 📣 Node developers. We’re building highly functional applications, but it’s time to add some pizzazz and breathe new life into our software creations. In this article, we’ll learn how to sprinkle in some emoji to add sparkle✨ to our Node projects with the help of the node-emoji package. We’ll culminate our efforts with the creation of a command-line emoji picker that we can use in a variety of contexts.

Share
Raspberry Pi ngrok

How to Host a Raspberry Pi Web Server on the Internet with ngrok

In Create a Web Server in Node without any Code, we used the http-server npm module to create a web server and serve up files in record time. Today I will share a way you can take the web server you built and make it available beyond your local network and on the public Internet. This is cool trick, but I recommend that you use this with caution as this will open a hole in your router/firewall when you make your web server available to the world. Let’s get started!

Share
Node file watching

How to Watch for Files Changes in Node.js

In a previous article on counting unique items in a JavaScript array, I introduced you to the system I am creating that enables our family to log when the fish 🐟 in our aquarium have been fed. The feeding times are logged to a file by pressing a push-button on a circuit board connected to a Raspberry Pi, pressing an Amazon Dash button, or clicking a button through a web interface. The resulting log file looks like this: 2018-5-21 19:06:48|circuit board 2018-5-21 10:11:22|dash button 2018-5-20 11:46:54|web Our next challenge is to watch this log file for changes as button pushes are streamed in from one of our three sources (Amazon Read More

Share
Count array items in JavaScript

How to Count Unique Items in JavaScript Arrays

The fish 🐟 in our home aquarium aren’t very communicative. I don’t necessarily need them to communicate their deepest emotions, but it would be helpful if they would at least tell me when they are hungry. Believe it or not, they don’t. Alas, when I peer inside the aquarium, I don’t know if they are hungry or if someone else in the family has already fed them breakfast🍩 or dinner🍕. IoT to the rescue! I am in the process of creating a system that enables our family to log when the fish have been fed. The feeding times can be logged by pressing a push-button on a circuit board connected Read More

Share
Upgrade Node.js Windows

Install and Upgrade Node.js on Windows the Easy Way

It’s easy to install and upgrade Node.js on the Raspberry Pi as explained in my guides on installing Node.js and upgrading Node.js on a Raspberry Pi. In fact, it’s easy on any Linux-based system. For Windows systems, however, the default installation routine of downloading and running MSI files from the Node.js website is not so streamlined. I was not keeping Node.js on my Windows systems up to date due to the activation energy required to do the installations. Today, however, everything changes. In this article, we will learn how to install and upgrade Node.js on Windows from the command line—and make the ongoing upgrade process as easy as double clicking Read More

Share
toml files

Using TOML Config Files in Your Node.js Applications

In this article, we’ll learn how to use TOML, a rising star ⭐in the configuration file world, with Node.js. After reading this article, you will understand the TOML syntax including how to use it to model JavaScript objects in your Node applications. After recently finishing my tutorial on Using INI Files with Node.js, I stumbled across the TOML configuration file format when conducting some focused learning on Rust. It turns out that Cargo, Rust’s package manager, uses TOML for its Cargo.toml configuration file, which serves in a similar capacity to the package.json file used by npm with Node. I excitedly delved into TOML and to learn more, and emerged quite Read More

Share

Guide to Using Redis with Node.js Released

I just completed a pretty extensive Guide to Using Redis with Node.js.  In this guide, we explore using Redis, a fast in-memory database that persists on disk, in conjunction with Node.js. We work through real examples to help equip you to: Install Redis Use Redis as a standalone tool Build Node.js applications that interact with Redis You can check it out here.

Share

Consuming Node.js Microservices Created with Stdlib

In our last article, we learned how to create Node.js microservices using Polybit’s stdlib platform. We created a fabulous (IMHO 🙂 ) GPS service that enabled us to retrieve the name of a city based on its GPS coordinates. Today, we’re going to learn how to consume data returned from this stdlib GPS microservice using several methods. While the information presented here is specific to consuming Polybit stdlib microservices, many aspects of this article will be generally applicable for consuming Web API JSON data from any http endpoint. Strap on your seatbelts as we embark on a whirlwind tour to learn about consuming JSON data from a variety of contexts…and I’m Read More

Share