JavaScript

How to Use Node.js and Github Webhooks to Keep Remote Projects in Sync — step-by-step Linux tutorial on Progressive Robot

How to Use Node.js and Github Webhooks to Keep Remote Projects in Sync

In this guide you will develop a Node.js server that listens for a GitHub webhook notification whenever you or someone else pushes code to GitHub. This script will automatically update a repository on a remote server with the most recent version of the code, eliminating the need to log in to a server to pull new commits.

Read more
How To Handle Asynchronous Tasks with Node.js and BullMQ — step-by-step Databases tutorial on Progressive Robot

How To Handle Asynchronous Tasks with Node.js and BullMQ

To avoid slowing down the request/response circle, you can use bullmq, a distributed task queue that allows you to offload time-consuming tasks from your Node.js app. To keep track of jobs, bullmq uses Redis to store a short description of each job in a queue. In this article, you will use bullmq to offload a time-consuming task into the background, which will enable an application to respond quickly to users.

Read more
Using the React-Async Library for Declarative Data Fetching — step-by-step Javascript tutorial on Progressive Robot

Using the React-Async Library for Declarative Data Fetching

The combination of React and `async-await` leads to a mixed pattern in which we have both imperative code (for data fetching) and declarative code (for UI composition). [React-async](https://github.com/ghengeveld/react-async) provides a declarative API to perform any REST API calls using a single React component, allowing declarative programming to be used throughout the application. In this article, we will explain how the React-Async library helps us fetch data.

Read more
An Introduction to Closures and Currying in JavaScript — step-by-step Javascript tutorial on Progressive Robot

An Introduction to Closures and Currying in JavaScript

If you write code in JavaScript it’s quite likely you have come across the term `closure`, which is a useful yet often confusing concept. But just what is a closure? And what is currying? In this tutorial we’ll explain these terms and demonstrate their use with example JavaScript code.

Read more
A Fetch API Primer — step-by-step Javascript tutorial on Progressive Robot

A Fetch API Primer

In this quick post we’ll go over using the Fetch API to GET or POST some JSON data to an external resource. We’ll also go over proper error handling.

Read more
How To Handle CPU-Bound Tasks with Web Workers — step-by-step Javascript tutorial on Progressive Robot

How To Handle CPU-Bound Tasks with Web Workers

In this tutorial, you will create a CPU-bound task that blocks the main thread in the browser and observe how it affects the web app. You will then unsuccessfully attempt to make a CPU-bound task non-blocking using promises. Finally, you will create a Web Worker to offload a CPU-bound task to another thread to prevent it from blocking the main thread.

Read more
CHAT