Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Node.js Articles
Found 212 articles
How to read and write JSON file using Node?
Node.js provides powerful tools for working with files, including reading and writing JSON files. JSON (JavaScript Object Notation) is widely used for storing and exchanging data in applications. This article walks you through reading and writing JSON files in Node.js with examples. Approaches to Read JSON file Using fs.readFileSync (Synchronous) Using fs.readFile (Asynchronous) JSON File data.json { "name": "PankajBind", "age": 21, "skills": ["JavaScript", "Node.js", "React"] } Using fs.readFileSync (Synchronous) The fs module in Node.js provides methods to interact with the file ...
Read MoreHow to use Class in Node?
Introduction Node.js is trending as an environment where different efficient and logical applications are executed at the moment. One of them is extending modern JS syntax, for example, classes, which makes OOP in Node.js more possible to use and improve. Scroll down to learn what a class is in Node.js, how one can be defined, how methods can/must be added, subclass/superclass in Node.js, and some uses of classes in Node.js. What is a Class in Node.js? A class is a blueprint of objects that have certain characteristics and behaviors or actions. Classes were introduced in ECMAScript 2015 ( ES6) as ...
Read MoreHow to update Node.js and NPM to the latest version?
Having the latest Node.js and NPM is crucial as developers get to have access to the new features, security fixes, and improved performance. In those tools, you need to learn the following general steps in order to update them quickly This is the simplest guide to update those two tools. Why Update Node.js and NPM? Here are some reasons why you should update Node.js and NPM − Access New Features: Every one or two updates, new features and improvements make their ways into the software. Improved Security: Updates patch and other vulnerabilities in the environment so as to remove ...
Read MoreHow to use an ES6 import in Node.js?
Since ES6, JavaScript has a standardized way in terms of using the import statement in your project to include modules. Originally Node.js was using require() to import a module but with the update it is also imported ES6 import. This article will explain how to use ES6 import in Node.js, why it is important, and what constitutes good practice. Why Use ES6 Imports in Node.js? The following are some key reasons why you should use ES6 imports in Node.js − Modern Syntax: import is even better than require() to import modules because it is clean ...
Read MoreDifference between Node require and ES6 import and export
When working with JavaScript, especially in a Node.js or modern JavaScript environment, you often come across two popular module systems: use require which comes from the CommonJS and import and export keywords which came with ES6. They are both used with the same goal of modularizing your code but they differ as to how and what you use or do with them. Now let us discuss these differences in a greater detail. What is Node.js require? The require is the module-loading mechanism in CommonJS, the default module system for Node.js. It allows you to include modules, JSON files, or local ...
Read MoreHow to Create and Run Node.js Project in VS Code Editor?
Node.js is one of the most vital tools in the hands of modern developers to create the necessary server applications. In this article, you will learn about how to create and run a Node.js project in one of the best, and most used, editors named Visual Studio Code (VS Code). What is Node.js? Node.js is an open-source cross-platform runtime environment for executing JavaScript code on the server side. It will be beneficial for creating web servers, APIs, and applications that run in real-time. Key Features of Node.js The following are the key features of Node.js − ...
Read MoreDifference between npm i and npm ci in Node.js
Dealing with Node.js, using npm (Node Package Manager), is important for creating and installing the necessary packages for the project. While most developers know what happens when running npm install or npm i, the npm ci often appears in discussions about continuous integration and continuous delivery pipelines alongside reproducible build processes. This article is about the distinction between "npm i" and "npm ci", the situations in which one should be used over the other, and how each is employed. What is npm i (or npm install)? The "npm i" is actually an abbreviation for npm install, which is the main ...
Read MoreHow to read and write Excel file in Node.js?
ExcelJS is a JavaScript library that provides a convenient solution for working with '.xlsx' files, allowing you to read, manipulate, and save data programmatically using Node.js. In this tutorial, we'll walk through the steps for reading from and writing to Excel files in Node.js using ExcelJS. You'll learn how to initialize a workbook, read data from existing Excel files, dynamically build new worksheets, and save updates. Each section includes practical examples to help you apply the concepts in real-world scenarios. Prerequisite You should have a basic understanding of JavaScript You should ...
Read MoreTop Web Frameworks Among Developers
Developer is the most demanding profile these days, so to become a developer you have to be updated with the new technologies used by top companies and developers. Here in this article, we list down the top 10 web frameworks by considering the reports of several renowned platforms like Stack Overflow and Statista. List of Top Frameworks and Libraries Explore the leading web frameworks of 2024, favored by developers. Gain insights into their functionalities and how they can elevate your web development projects. ...
Read MoreHow to connect Node with React?
Node.js and ReactJS each tech stack are popularly utilized in modern-day full-stack web programs. ReactJS is used for the front stop and Node.js is used for the again quit. ReactJS is a famous JavaScript library for building user interfaces (UIs). React main objective to simplify the intricate method of building interactive consumer interfaces. Node.js is an open-supply, cross-platform JavaScript runtime environment. It is ideal for handling fast and scalable servers that can handle simultaneous connections with high throughput. Connect Backend to Frontend Before connecting the backend and frontend ...
Read More