Systems | Development | Analytics | API | Testing

NodeJS

Testing Bunjs Web Application With Cucumber Js And Keploy

In our previous blog, we explored how to build a modern web server using BunJs and Prisma, integrating robust authentication mechanisms with JWT tokens. Now, it’s time to ensure our application is reliable and error-free through thorough testing. In this blog, we’ll dive into testing methodologies using Cucumber JS and Keploy, both are a powerful tools that streamline the testing process and enhance the quality of our application.

Understanding Offset and Cursor-Based Pagination in Node.js

Pagination means dividing a big chunk of data into smaller pages. It unlocks performance benefits for the backend, while also improving UX by sending manageable pieces of data to a client. In this article, we'll explore offset-based and cursor-based server-side pagination approaches, compare them, and implement cursor-based pagination in Node.js. Let's get started!

What's New in Node.js 22

Node.js 22 has been released, offering a compelling upgrade for developers. It takes over the 'Current' release line, while v21 transitions into maintenance mode until its end-of-life in June. This release delivers advances like a stabilized Watch mode, pattern matching support in the fs module, a default-enabled WebSocket client, and a new--run flag for script execution. It also offers some performance improvements and the usual V8 engine upgrade.

When to Use Bun Instead of Node.js

Bun and Node.js are two JavaScript runtime technologies to run JavaScript on the server. Node.js is the undisputed king of server-side development with JavaScript, but Bun has gained popularity thanks to its unbelievable performance capabilities. The real question is, though: does it really make sense to use Bun instead of Node.js? Let's learn about Bun and Node.js, dig into their characteristics, and explore some scenarios where Bun can be a better alternative to Node.js.

Solving Memory Leaks in Node.js has Never Been Easier, Introducing the Latest Version of N|Solid

We are thrilled to announce the release of a new feature in N|Solid that includes sample heap profiling and heap objects observability for main processes and worker threads. N|Solid is known for its Node.js performance and security observability and diagnostic tools and best-in-class low overhead has completed a new innovation to hunt memory leaks in development and production environments. Memory is a precious resource in computing.

How to Implement Rate Limiting in Express for Node.js

Rate limiting is a fundamental mechanism for controlling the number of requests a client can make to a server in a given time frame. In a world where more than 30% of web traffic comes from malicious bots, that proactive strategy is critical to protect servers from abuse. In this tutorial, you'll delve into the concept of rate limiting and understand why you need it in your Node.js backend. Then, you'll learn how to implement it in Express to block or slow down incoming excess requests.

Enhancing Node.js Core: Introducing Support for Synchronous ESM Graphs

Exciting news this week! One of the latest features in Node.js core is the addition of support for requiring synchronous ECMAScript Modules (ESM) graphs. This enhancement promises to simplify the transition for package authors and users alike, as the ecosystem gradually shifts towards ESM. This long-awaited feature, enabled via the --experimental-require-module flag, marks a pivotal moment in Node.js development, addressing a persistent pain point for developers.

N|Solid: Node.js Compatibility Proven through Fastify CI Integration

At NodeSource, we understand the hesitance and scrutiny that often accompany claims of "Node.js compatibility". The Node.js ecosystem is vast and intricate, and as Matteo Collina rightly points out, passing a "hello world" example is just the start. We believe N|Solid should be a component of every Node.js project, especially in production, to provide developers and organizations with the most advanced performance and security observability tooling.

Node.js Performance APIs: An Introduction

Node.js offers a rich set of performance data through its APIs, similar to how modern web browsers expose performance metrics for webpages. With tools like the Performance Measurement API and the perf_hooks module in Node.js, you can gain insights into your application's performance from the server's perspective, closely aligning with what the end user experiences. In this article, the first of a two-part series about performance hooks, we'll explore how to approach performance optimization in Node.js.