Systems | Development | Analytics | API | Testing

NodeJS

How to connect to Ably directly (and why you probably shouldn't) - Part 2

In Part 1 of this two-part series, we walked through how to bypass Ably’s SDKs and connect to Ably’s backend using websocat, where every JSON message has to be typed out by hand. In this second part, we’ll fix that tedious bit by switching to NodeJS, and we’ll continue our process of building our own minimal Ably (NodeJS) SDK.

Node.js Module Exports Explained

As Donald Knuth very wisely put it, computer programming is an art. And an integral aspect of writing clean code and staying true to this art is modularity. This post will cover the use of modules in Node.js — what they are, why they are essential, and how to export and import them in your project. Here’s an outline of what we’ll be covering so you can easily navigate or skip ahead in the post.

Best Practices for Logging in Node.js

Good logging practices are crucial for monitoring and troubleshooting your Node.js servers. They help you track errors in the application, discover performance optimization opportunities, and carry out different kinds of analysis on the system (such as in the case of outages or security issues) to make critical product decisions. Even though logging is an essential aspect of building robust web applications, it’s often ignored or glossed over in discussions about development best practices.

11 Best Tips to Node.js Debugging that You Didn't Know

When people hear the term "Node.js Debugging," they immediately think of the function "console.log()." They also assumed that's how pros debug Node.js applications. Nah!!! That's not good enough, mate. You'll need more than the console.log() function to debug your Node.js application like a pro. If the proper technique is not taken before testing, debugging a Node.js application might be difficult. Testing is an essential part of the development process for any application, software, or website.

The Top 5 Node.js Performance Measurement Metrics

Using Node.js as a JavasScript runtime has its advantages. However, it requires significant maintenance to keep it working as expected. Here are the top metrics you should monitor for Node.js performance measurement analysis. Application programming interfaces or APIs that use the Node.js runtime environment are scalable. Node.js is asynchronous and event-driven, which means the application can handle multiple connections at the same time.

NAN to Node-API Migration: A Short Story

Throughout the years I’ve created my fair share of native addons. The first ones were created by using the native C++ Node.js and v8 API’s. When NAN was created which made life much easier, especially in terms of maintenance, there was no question that I should move all my addons to use it. The years passed and Node-API was created and though it was on my radar and saw the benefits of using it, I never had the time to try it on my own modules.

CPU Profiles as a Diagnostics tool in Node.js

With Node.js applications and services, spotting the performance bottlenecks in your applications is deciding to take real advantage of the speed and reliability that Node.js has to offer. A CPU profile is a way to understand how your application is executed, what functions devour what percent of CPU time, and provides enough information for a more precise application diagnostic.

An Ultimate Guide to Node.js Logging

Logging helps developers in reducing errors and cyber-attacks. The application is designed to be dynamic. We can't always predict how an application will react to data changes, errors, or program changes. Logging in allows us to better understand our own programs. For all applications, an absolute logging solution is essential. A good logging system increases the application's stability and makes it easier to maintain on the production server.