Home » JavaScript

JavaScript

Session Management in Node.js

Hello. This tutorial will explain session management in the node.js application. 1. Introduction Session management is an important part of any application that helps the application track the users and their activities. To understand this we will be using a cookie which is key-value pair stored in the browser. The browser then attaches the cookies to every HTTP request sent ...

Read More »

Local Authentication Using Passport in Node.js

Hello. This tutorial will explain authentication in the Node.js applications through the passport module. 1. Introduction Passport.js is an authentication middleware designed for Nodejs. passport-local uses the passport strategy for authenticating with a username and password. The module helps to authenticate using a username and password in the nodejs applications. If you are interested in reading further about this module ...

Read More »

How to close a React Native modal with a button

I’ve been working with React Native lately, and I’ve come across a few unimplemented features I needed to add to the basic components. One of those components is the React Native Modal component that is used to show a view above another one. It doesn’t promise more features than that, but it can be very useful to implement your own ...

Read More »

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 »