How to use an ES6 import in Node.js?
ES6 or ECMAScript 2015 is the 6th edition of the ECMAScript language specification standard. It defines the standard on how to implement JavaScript....
read more
Difference between Promise and async/await in Node
Promises use .then() and .catch() for handling asynchronous operations and chaining, while async/await provides a more readable, synchronous-like syntax for managing asynchronous code with try/catch for error handling....
read more
Node forEach() function
forEach() is an array function Node that is used to iterate over items in a given array....
read more
JWT Authentication with Node.js
JSON Web Token is an open standard for securely transferring data within parties using a JSON object. JWT is used for stateless authentication mechanisms for users and providers, this means maintaining sessions on the client side instead of storing sessions on the server. Here, we will implement the JWT authentication system in NodeJs....
read more
How to connect Node with React ?
In this article, we will see how Node JS and React JS are an important part of developing full-stack web applications, where React is used for the front end and Node for the back end....
read more
How to Completely Remove Node.js from Windows ?
We can remove the nodejs from window by uninstalling it from the programs list. Node.js is a popular JavaScript runtime used for building server-side applications. However, there may come a time when you need to remove Node.js from your Windows system completely. Whether it’s due to a corrupted installation, needing to install a different version, or simply not needing it anymore, here’s a comprehensive guide to uninstall Node.js from your Windows machine....
read more
JWT Authentication With Refresh Tokens
When building a web application, authentication is one of the important aspects, and we usually implement authentication using JWT tokens (You can learn more about JWT here). We create an access token and store it in the local storage or session or cookie. But there is a more secure way to implement this using Refresh Tokens....
read more
How to Fetch Images from Node Server ?
The images, CSS files, JavaScript files, and other files that the client downloads from the server are known as static files. These static files can be fetched with the use of the express framework and without the use of it. The methods that can be used to serve static files are discussed below. The image to be accessed (geeksforgeeks.png) is placed inside the images folder, as shown in the directory tree below:...
read more
Difference between Node.js and JavaScript
JavaScript and Node.js are both crucial in modern web development, but they serve different purposes and are used in different environments. JavaScript is a programming language primarily used for client-side web development, while Node is a runtime environment that allows JavaScript to be executed on the server side....
read more
Steps to Create an Express.js Application
Creating an Express.js application involves several steps that guide you through setting up a basic server to handle complex routes and middleware. Express.js is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. Here’s a comprehensive guide to get you started with your Express.js application....
read more
Use EJS as Template Engine in Node.js
EJS: EJS or Embedded Javascript Templating is a templating engine used by Node.js. Template engine helps to create an HTML template with minimal code. Also, it can inject data into an HTML template on the client side and produce the final HTML. EJS is a simple templating language that is used to generate HTML markup with plain JavaScript. It also helps to embed JavaScript into HTML pages. To begin with, using EJS as templating engine we need to install EJS using the given command:...
read more
Node.js split() function
The split() function is a string function of Node.js which is used to split strings into sub-strings. This function returns the output in array form....
read more