Node.js

Node.js is a JavaScript runtime that allows for server-side scripting, enabling the development of scalable network applications using a non-blocking, event-driven architecture.

Node.js Error: Can’t set headers after they are sent to the client

Updated: December 27, 2023 By: Guest Contributor

An understanding of HTTP headers and response handling is crucial for Node.js developers, as it is foundational for web application development. In this guide, we’ll take a deep…

How to set up TypeScript for a Node.js project

Updated: December 2, 2023 By: Khue

TypeScript can help you write more reliable and maintainable code for your Node.js projects. TypeScript code needs to be compiled into JavaScript before it can be executed by…

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

Updated: December 2, 2023 By: Khue

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,…

How to Set Default Time Zone in Node.js

Updated: December 2, 2023 By: Khue

This short article walks you through 2 different ways to set the default time zone in Node.js. The first approach is to modify the TZ environment variable and…

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

Updated: December 2, 2023 By: Khue

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…

How to Hash a Password in Node.js (3 Approaches)

Updated: December 2, 2023 By: Khue

Hashing passwords is critical for backend developers to secure user data. This process turns passwords into unreadable strings, thwarting unauthorized access even if there’s a security breach, and…

Deploy Node.js App on Ubuntu with PM2, NGINX and Let’s Encrypt

Updated: December 28, 2023 By: Khue

Deploying a Node.js application on an Ubuntu server may seem daunting, but it doesn’t have to be. In this guide, we’ll walk you through the process of deploying…

1 54 55 56