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…

7 best Node.js frameworks to build backend APIs in 2022

January 10, 2022 Guest Contributor

Node.js helps us build fast and high-performance backends for websites and mobile apps of all sizes. This job is made easier and more convenient thanks to the help of open-source frameworks. In this article, we will…

Top 5 best Node.js Open Source Headless CMS in 2022

February 8, 2022 Guest Contributor

Using a Node.js Headless CMS (CMS stands for Content Management System) will help you quickly build a fast and high-performance self-hosted backend for your application with many pre-made things like admin dashboard, content CRUD (create, read,…

Node.js: Get domain, hostname, and protocol from a URL

March 19, 2022 Guest Contributor

By using the URL class, a built-in module of Node.js, we can easily extract domain/hostname and protocol from a given url without using any third-party package. Domain, hostname, and protocol A domain name is the address…

NPM: How To Show All Globally Installed Packages

January 26, 2022 A Goodman

To show all globally installed npm packages on your computer, just run the following command: Here is my output: If you want to see all global packages and their dependencies, use this: That’s it. Further reading:…

How to Generate Slugs from Titles in Node.js

July 10, 2022 Augustus

This article shows you a few approaches to generating a slug from a title in Node.js. The first one is to use self-written code and the other is to use a third-party package. Introduction A slug…

3 Ways to Generate Random Strings in Node.js

November 24, 2021 Napoleon

This article walks you through 3 different ways to generate a random string in Node.js. The first two approaches only use self-written code and utilize the built-in functionality of Node.js. The last approach introduces to you…

Node.js: Reading content from PDF and CSV files

March 19, 2022 A Goodman

Introduction Node.js is non-blocking I/O so it is efficient when working with files even super-large files. PDF, which stands for Portable Document Format, is used to display text and images independently with software and hardware. CSV…

How to Resize Images using Node.js

July 12, 2022 A Goodman

This article walks you through a couple of different ways to programmatically resize images in Node.js. Using sharp The sharp package is fast in converting large images to smaller ones. It works well with JPEG, PNG,…

1 2 3 4 5