node

Unleash ServBay’s Power! Managing Local Hosts File

Unleash ServBay’s Power! Managing Local Hosts File

In macOS, the hosts file is used to map specific domain names to designated IP addresses. This is very useful for developing, testing, and debugging web applications. ServBay provides a convenient interface to manage the local hosts file on macOS, making it easier to add, modify, pause, and delete records. This article will detail how to use ServBay to manage the local hosts file. Viewing the Current Local Hosts File The hosts file is located at the path /etc/hosts. With ServBay, you can easily view the contents of the current local hosts file. Viewing Steps Open the ServBay management interface.…
Read More
Solving the Node.js console.time is not a function error

Solving the Node.js console.time is not a function error

Written by Joseph Mawa✏️ The console.time is not a function error is one of the common errors you will encounter in JavaScript and Node. It is a TypeError and its error message usually takes the following forms: console.time is not a function console.time(...) is not a function The first error message is usually caused by accidentally modifying the built-in console object or reassigning the console.time property to a value that is not a function. One of the main causes of the second error is the way JavaScript internally handles Automatic Semicolon Insertion (ASI). Continue reading to learn more about the…
Read More
We reach 750+ Stars on our Repository!

We reach 750+ Stars on our Repository!

Hi everyone, I'm Antonio, CEO at Litlyx. Today, I want to share a huge milestone with you. Over the years of my career as a Software Developer, I’ve gained so much from the Open-Source community. It’s likely that, in your codebase, you have 10 or more dependencies on open-source libraries in each tech stack you use. Thanks to this thriving community worldwide, we, as individuals, can grow our coding knowledge immensely. The past five months have been a rollercoaster of emotions for me. But now, it’s time to give back and pay the debt I've accumulated over the years from…
Read More
Installing And Running NPM Packages Using The Terminal

Installing And Running NPM Packages Using The Terminal

When working on a JavaScript project, chances are you'll need to install and use npm (Node Package Manager) packages. npm is essential for managing libraries and tools that enhance your development process. If you're new to this, here's a step-by-step guide to installing and running npm packages using the terminal. PrerequisitesInstall Node.js: Ensure that the recent version of Node.js is installed on your machine, as npm comes bundled with it. You can check if it's installed by running: and If you don't have it installed, download it from https://nodejs.org/https://nodejs.org/ and follow the installation instructions. After confirming it is successfully installed,…
Read More
Building a Website with Node.js and Express.js

Building a Website with Node.js and Express.js

This article divides deep into building websites with Node.js and Express.js. Express.js is an essential framework for creating robust and scalable web applications on top of Node.js, and today's focus will be on routing, middleware, template engines, and cookie sessions. Concept Highlights: app.use(callback) app.use(path, callback) GET, POST, PUT, DELETE Express Middleware Call the Next Middleware in the Stack Using Express Router Cookie Session Management Middleware Template Variables EJS 1. app.use(callback) The app.use(callback) method in Express.js is used to mount middleware functions. This middleware will run for every request made to your application, regardless of the HTTP method or URL. e.g.)…
Read More
NPM peerDependencies in Depth: A Comprehensive Introduction

NPM peerDependencies in Depth: A Comprehensive Introduction

As Javascript developers, we all know two different dependencies in our projects, dependencies and devDependencies, but what about peerDependencies? In this series, we will examine this less common dependency in Javascript. We will study what they are, what I need to know about as a library user, and what best practices are for library authors. What are dependencies in NPM Let's recap the different common types: dependencies: these are the tools used in your application; a good example is react, angular, and express. When your application is in production, the code of the libraries on dependencies will run under the…
Read More
Redux toolkit: React Thunk and React Saga.Learn from Vishal Tiwari.

Redux toolkit: React Thunk and React Saga.Learn from Vishal Tiwari.

React Thunk and React Saga are middleware libraries for handling side effects in React applications, especially for managing asynchronous operations like API calls. Both are commonly used with Redux but serve slightly different purposes and approaches. React Thunk 1. Overview: React Thunk is a middleware that allows you to write action creators that return functions instead of action objects. This is useful for handling asynchronous operations like API requests or complex synchronous logic (like conditional dispatching of actions). The returned function receives dispatch and getState as arguments, allowing you to dispatch other actions or access the current state within the…
Read More
20 Essential JavaScript Concepts Every Node Developer Should Conquer

20 Essential JavaScript Concepts Every Node Developer Should Conquer

Mastering Core JavaScript Concepts for Node.js Developers JavaScript has led the way in coding by being the language of choice for both frontend and backend development, with NodeJs at the forefront. Before the buzz around server-side JavaScript became cool, everyone recognized JS as the plucky maverick of the movement. While newer platforms such as Deno and Bun have started to provide competition, NodeJs remains the backbone of web apps and system software, with millions of lines of code written and executed using JS. Built on its unique single-threaded, asynchronous architecture and tools like Express, NodeJs is both a boon and…
Read More
Buffers: Node.js

Buffers: Node.js

Simple Guide to Buffers in Node.js A Buffer in Node.js is used to handle raw binary data, which is useful when working with streams, files, or network data. How to Create Buffers From a String: const buf = Buffer.from('Hello'); Enter fullscreen mode Exit fullscreen mode Allocate a Buffer with a specific size: const buf = Buffer.alloc(10); // 10-byte buffer filled with zeros Enter fullscreen mode Exit fullscreen mode From an Array of bytes: const buf = Buffer.from([72, 101, 108, 108, 111]); // Represents 'Hello' Enter fullscreen mode Exit fullscreen mode Important Buffer Functions Convert Buffer to String: const buf =…
Read More
Basic Docker Terminologies

Basic Docker Terminologies

1. Container A container is like a box that holds your application and everything it needs to run, such as libraries and settings. Containers are lightweight and can run anywhere without issues. Points to remember:- containers are isolated (independent of other containers). Portable: You can move containers from one computer to another easily. 2. Image An image is a template used to create containers. It includes the app code and everything needed to run it. Think Image like an Operating System in which multiple container can run. Points to remember:- Read-Only: Once created, you can't change an image. Layered: Images…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.