Best open-source ORM and ODM libraries for Node.js (2023)

January 2, 2023 Guest Contributor

ORM stands for Object-Relational Mapping, which maps between Object Model and a Relational Database like MySQL, PostgreSQL, MS SQL, SQLite, etc. ODM is the abbreviation for Object Data Model that maps between an Object Model and…

7 Best Open-Source HTTP Request Libraries for Node.js (2023)

January 2, 2023 Guest Contributor

This article walks you through a list of the best open-source HTTP request libraries for Node.js in the year 2023. Without any further ado (like talking about the history of Node or explaining what HTTP is),…

Node.js: Executing a Piece of Code after a Delay

August 26, 2021 A Goodman

In Node.js, we can use the setTimeout function to run a piece of code after a delay. You can call setTimeout directly or use it with async/await. Example 1 – setTimeout This code runs a function…

Mongoose: Counting Documents that Satisfy Conditions

August 26, 2021 A Goodman

Mongoose is a great open-source that is widely used when building backend with Node.js and MongoDB. It supports several built-in methods that can help us count documents that satisfy given conditions in a database collection: Model.count({…

Node + Express: How to Return XML Response

July 12, 2022 A Goodman

This article walks you through a few examples of responding in XML when using Express and Node.js. Besides express, we don’t need any other npm libraries. Example 1: Basic This example creates a list of fiction…

How to Delete a File or Directory in Node.js

July 12, 2022 Augustus

This article shows you a couple of different ways to remove a file or a directory using Node.js. We’ll use modern Javascript (ES6 and newer) and the latest features provided by Node.js core. No third-party libraries…

Node.js: Ways to Create a Directory If It Doesn’t Exist

July 12, 2022 Augustus

This article walks you through a couple of different ways to create a directory if it doesn’t exist in Node.js. Using the FS module FS, which stands for “file system”, is a standard module of Node.js…

How to install Redis on macOS, Windows, and Ubuntu

July 12, 2022 A Goodman

This article shows you how to install and get Redis ready to use on macOS, Windows, and Ubuntu. macOS The easy and reliable way to install Redis on a Mac is using Homebrew (a free, popular,…

4 Ways to Convert Object into Query String in Node.js

July 12, 2022 Augustus

This article shows you a couple of different ways to convert (stringify) objects into query strings in Node.js. Using URLSearchParams API The URLSearchParams class comes with the URL module and is available on the global object…

Node.js: How to Use “Import” and “Require” in the Same File

July 12, 2022 A Goodman

This article shows you how to enable ES6 import/export in Node.js and use both require and import in the same file. Enabling ES import/export You can use ES6 import/export in Node.js by simply adding “type”: “module”…

The Best Way to Upgrade Node.js on Mac

July 10, 2022 A Goodman

Node.js is updated very often to fix bugs, improve performance and add new features. This article shows you how to correctly upgrade Node.js and npm in macOS. The Steps 1. Go to nodejs.org, the official website…

Node.js: Get File Name and Extension from Path/URL

March 19, 2022 A Goodman

The path module (one of the core modules of Node.js) gives us some methods to simply retrieve the name and extension of a file from a path or web URL: path.basename(path: string, extension?: string): Returns the…

1 2 3 4 5 6