How to Get POST Data in Node ?
Handling POST data is a fundamental aspect of developing web applications and APIs using Node.js. POST requests are used when a client needs to send data to the server, such as submitting form data, uploading files, or sending JSON payloads. This article will cover various methods to retrieve and handle POST data in Node.js, enhancing your server-side capabilities....
read more
Node.js MySQL-Create Table Using Sequelize
Introduction to Sequelize: Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. Its features are solid transaction support, relations, eager and lazy loading, read replication and many more....
read more
How to Send Response From Server to Client using Node.js and Express.js ?
In web development, sending responses from the server to the client is a fundamental aspect of building interactive and dynamic applications. Express.js, a popular framework for Node.js, simplifies this process, making it easy to send various types of responses such as HTML, JSON, files, and more. This article will guide you through the process of sending different types of responses from a server to a client using Node.js and Express.js....
read more
What is NODE_ENV in Node ?
In Node.js, NODE_ENV is an environment variable used to define the current environment in which the Node.js application is running. It plays a crucial role in configuring the behavior of the application based on different environments such as development, staging, and production. This article delves into the significance of NODE_ENV, its usage, and best practices for managing environments in Node.js applications....
read more
How to implement JWT authentication in Express app ?
A JSON Web Token (JWT) is a JSON object utilized to securely transmit information between two parties over the web. Primarily employed in authentication systems, JWTs can also facilitate secure data exchange. These tokens enhance security by incorporating encryption, and for added protection, a signature can be appended. A JWT comprises a header JSON, a payload JSON, and an optional signature. Each of these components is concatenated with a period (“.”) separator....
read more
Convert JSON file into CSV file and displaying the data using Node.js
There are so many ways to store data for better understanding for individual purposes, in few cases, JSON files will be more suitable in few cases, CSV files, and there are also lots of other types as well like XML, etc. In this article, we will convert the JSON file data into CSV file data and also display that through Node.js....
read more
How to Run Many Parallel HTTP Requests using Node.js ?
We know NodeJS application is single-threaded. Say, if processing involves request A that takes 10 seconds, it does not mean that a request which comes after this request needs to wait 10 seconds to start processing because NodeJS event loops are only single-threaded. The entire NodeJS architecture is not single-threaded....
read more
How to format the current date in MM/DD/YYYY HH:MM:SS format using Node?
The current date can be formatted by using Nodejs modules like Date Object or libraries like moment.js....
read more
How to Return JSON using Node.js ?
Node.js is a powerful platform for building server-side applications and returning JSON data is a common task in web development, especially when building APIs. JSON stands for JavaScript Object Notation. It is one of the most widely used formats for exchanging information across applications. Node.js supports various frameworks that help to make the processes smoother. The following ways cover how to return JSON data in our application from Node.js. This article will guide you through the process of setting up a simple Node.js server that returns JSON data in response to client requests....
read more
How to redirect back to original URL in Node.js ?
Node.js with the help of Express, supports web page routing. This means that when the client makes different requests, the application is routed to different web pages depending upon the request made and the routing methods defined. To learn more about Node.js routing and its implementation, refer this article....
read more
Libuv in Node.js
Node.js relies on various dependencies under the hood for providing various features....
read more
When to use next() and return next() in Node.js ?
In Node.js, particularly when working with the Express framework, middleware functions play a crucial role in handling requests. Two commonly used patterns within these middleware functions are next() and return next(). Understanding when and how to use these can significantly affect the flow and functionality of your application....
read more