Home » Express.js

Tag Archives: Express.js

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 »

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 »

Sequelize ORM in Node.js Application

Hello! In this tutorial, we will learn how to Sequelize ORM in Node.js Application. More specifically, we will build a RESTful application in a Node.js environment running on an Express.js server and PostgreSQL database to perform the CURD operations. We will also use the promise-based ORM dependency known as Sequelize to create the data model. 1. Introduction RESTful API stands ...

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 »

Routing in Express.js

Hello in this tutorial, we will understand how to handle routing in a Node.js application running on an Express.js server. 1. Introduction To set up Node.js on windows you will need to download the installer from this link. Click on the installer (also include the NPM package manager) for your platform and run the installer to start with the Node.js ...

Read More »

Writing RESTful Service using Node, Express and MongoDB

Looking at the popularity of Node.js, I thought of learning and creating a rest api that should create, delete and get employees from database and fortunately I did it. With this post, I will try to replicate the steps I followed while writing it along with references. Assuming Node.js is already installed in our system, let’s start creating nodejs-rest-api, following ...

Read More »