Systems | Development | Analytics | API | Testing

NodeJS

How to authenticate a Next.js Route Handler using Clerk

When building web applications you’ll often be using services on the client that require authentication. A common way client-side SDKs like Ably authenticate themselves is by using server-side API endpoints that generate and return access tokens. Using access tokens allows you to keep your service’s secrets on the server and instead issue time-limited and scope-limited tokens to a client. Some services even let you create revocable tokens for added security.

Managing PDFs in Node.js with pdf-lib

In today's digital age, Portable Document Format (PDF) files have become an integral part of how we share and manage documents. Regardless of whether it's contracts, reports, or presentations, PDFs provide a consistent and reliable way to present information across different platforms and devices. As developers, being able to manipulate and generate PDFs programmatically is a valuable skill. This is where the pdf-lib library for Node.js comes into play.

How to Optimize MongoDB Performance for Node.js

To update a document in MongoDB, I used to fetch it, update the values, and save back the entry. I would question the need for an update method. Looking back, it's evident that performance optimizations were hardly a concern when working on a personal project. Working with a larger dataset is a whole different story, though. This is where no-code tools can't help. In this article, I'll share some of my learnings when it comes to working in MongoDB with millions of documents.

Introducing N|Solid Copilot: Your AI-Powered Node.js Navigator

We are thrilled to announce the latest addition to N|Solid Pro - the N|Solid Copilot, a groundbreaking AI-powered assistant designed to revolutionize your Node.js development experience. This innovative tool is a leap forward in Node.js application observability and security, it’s like having a Node expert on-call. View of N|Solid Pro Console with the Copilot drawer open allowing a user to interact with the AI Assistant.

How to use WebSockets with React and Node

In this WebSocket tutorial, Alex Booker from Ably (@CodeCast) teaches you how to implement realtime updates in your React applications. Here, we use React on the frontend and Node on the back to build a live cursors feature from scratch, but the fundamental WebSocket lessons can be applied to any manner of realtime application. WebSockets are a bidirectional full-duplex communication protocol used to enable realtime updates such as chat, multiplayer collaboration, notifications, and other live updates in your React applications.

Best NodeJS frameworks for seamless backend development

NodeJS is a JavaScript runtime environment for running JavaScript applications outside the browser environment. It’s asynchronous and event-driven, meaning it doesn't block the event loop - making NodeJS highly suitable for the development of server-side web applications. With around 50,000 open source packages available through npm (Node Package Manager), NodeJS facilitates the seamless backend extension. The GitHub repository has 99k stars and 27.5k forks demonstrating an active community.

How to Use Timeouts in Node.js

Because of the asynchronous nature of Node.js, it's crucial you set timeouts to ensure the responsiveness of your application. Node.js timeouts help prevent indefinite waiting and let your backend handle situations where tasks take longer than expected. Thanks to timeouts, you can control the maximum duration allowed for incoming and outgoing requests. In this article, we'll look at the different types of timeouts and how to set them in vanilla Node.js and Express.

What's New in Node.js 21

Node.js v21, the latest Node update, is now available as a stable release. It supersedes v20 in the'Current' release line, which has been promoted to the long-term support (LTS) channel as of 24 October. This new version stabilizes the fetch and WebStreams API, adds a built-in WebSocket client, improves support for ES modules, and brings some notable performance improvements (as well as a customary update of Node.js dependencies such as V8).

8 Best WebSocket Libraries For Node

As a developer, choosing the right Websocket Node library to integrate into your realtime application project can be a humbling experience. You are faced with a lot of choices that offer different capabilities and features that will allow you to build scalable and efficient applications. However, given the constantly changing landscape, a crucial question remains: have you selected the most suitable one? Are there other options that could enhance your project even more?