Home » JavaScript

JavaScript

How To Get Data Of Attributes In JavaScript With Selenium

When performing Selenium test automation, you would have come across umpteen scenarios where there is a need to verify the properties and values of the WebElements. For example, you might need to get the element’s text value in your automation test code and later verify the same against the desired value. In Selenium, the getText() method is used for fetching ...

Read More »

Node.js JWT Implementation

Hello. In this tutorial, we will implement a Node.js JWT (JSON Web Token) to protect the application endpoints from unauthorized access. The Node.js framework is commonly used to create server-based applications which are further used to show the contents to the users. 1. Introduction JSON web tokens (or the JWT’s) is an Open RFC standard that defines a compact and ...

Read More »

Node.js and MongoDB Tutorial

Hello. In this tutorial, we will create a simple node.js application and perform the CRUD operations with the MongoDB. The node.js framework is commonly used to create server-based applications which are further used to show the contents to the users.  1. Introduction Let us first understand that what is Mongo database and set up Node.js. MongoDB is a high-performance NoSQL ...

Read More »

Create Node.js Web Server

Hello. In this tutorial, we will create a simple node.js web server and handle the HTTP requests. The node.js framework is commonly used to create server-based applications which are further used to show the contents to the users. 1. Introduction 1.1 Setting up Node.js To set up Node.js on windows you will need to download the installer from this link. ...

Read More »

Express.js File Upload

Hello! In this tutorial, we will learn about Express.js File Upload. More specifically, we will handle the file upload in the node.js application. To perform the file upload we will use a simple express middleware (named express-fileupload) as an npm package. 1. Introduction 1.1 Setting up Node.js To set up Node.js on windows you will need to download the installer ...

Read More »

Express.js Cookies Tutorial

Hello in this tutorial, we will understand Cookies and implement them in an Express.js application. 1. Introduction Cookies are a piece of any information sent from the server and are stored in the client’s browser. This information helps to track the client’s action and the browser sent it back to the server every time a client visits the website to ...

Read More »

REST API in Express.js

Hello in this tutorial, we will build a REST API in a Node.js environment running on an Express.js server. 1. Introduction RESTful API stands for the standard web service interface used by the applications to communicate with each other. This API conforms to the REST architectural style and constraints. It is scalable, stateless, cacheable, and has a uniform interface. It ...

Read More »

Express.js Sessions Tutorial

Hello! In this tutorial, we will explain the Express.js sessions. We will understand how to manage sessions in a Node.js application. HTTP is a stateless protocol and to manage sessions in a Node.js application we will use the express-session dependency. 1. Introduction To set up this application we will put the expression-session and cookie-parser middleware dependencies in place. But before ...

Read More »

Serving static files in Express.js

Hello in this tutorial, we will understand how to serve static files on an Express.js server. There are two ways to serve static files in express: Serving a single file through the HTTP response by configuring the path to the resource Serving multiple files from the public directory In this tutorial, we will go over the recommended approach which is ...

Read More »