Category: JavaScript

JavaScript Node.js

Using Push Notifications with Service Workers and Node.js

In this article, we cover another feature that we can implement with the help of Service Workers – Push Notifications. They come in handy if we need a fast channel of communicating with our users. We not only learn how to implement them in terms of code, but we also explore the User Experience side […]

JavaScript

React SSR with Next.js #1. Concept of Server Side Rendering & basics of routing

This entry is part 1 of 2 in the React SSR with Next.js

In recent years, the popularity of client-side Single Page Applications skyrocketed, for various reasons. Following its principles, we build pages with the amount of interactivity that we didn’t have before. When using React to render the page the “regular” way, the server sends a blank page and the JavaScript files. By doing that, the browser […]

JavaScript Node.js

Node.js TypeScript #14. Measuring processes & worker threads with Performance Hooks

This entry is part 15 of 15 in the Node.js TypeScript

When writing Node.js code, we can approach tasks in many ways. While all of them might work fine, some perform better than others, and as developers, we should strive to make both easily readable and fast applications. In this article, we learn how to measure the performance of our code using Performance Hooks, also called […]

JavaScript Node.js

Node.js TypeScript #13. Sending data between Worker Threads

This entry is part 14 of 15 in the Node.js TypeScript

The Worker Threads give us quite exciting features when compared to, for example, child processes. In this article, we create our instances of the MessageChannel to communicate with the Worker Threads. Aside from that, we also share the data between them: it’s something that is not possible with child processes. Communicating using the MessageChannel There […]

JavaScript Node.js

Node.js TypeScript #12. Introduction to Worker Threads with TypeScript

This entry is part 13 of 15 in the Node.js TypeScript

The Node.js and JavaScript are often perceived as a single-threaded but in this series, we prove that it is not entirely true. Node.js creates threads when performing Input/Output operations. Not only that, but we can also create additional processes. While the above does not count yet as multithreading, in this article we begin to cover […]