Sessions Session starts when you request the server for the first time and it remains till you close that site. The amount of time you have spent on the site is called a session. As sessions get deleted when the…
Category: Express Js
Sessions in Express Js
As we know HTTP is a stateless protocol, i.e it doesn’t stores any data. There are many cases where we have to store the user data to keep track of the user, here comes the use of sessions. When the…
Advantages and Disadvantages of Express Js
Express Js is a web framework used for creating server side code in Node Js. It is a lightweight framework, which offers almost all the necessary and basic features like routing and middlewares out of the box. Nowadays, the number…
Using MongoDB with Express Js
MongoDB is a NoSql database which is used to store a large volume of data. NoSql database not uses the tables and rows approach. In MongoDB the database is collection of documents, documents are collection of key-value pairs. Javascript developers…
Express Js Scaffolding
Scaffolding is the process of creating the skeleton of the project. In simple terms, the arrangement of different types of files in various folders. For example, managing all the CSS files, js files that we want to be public, in…
Templating in Express Js
Templating helps in converting the content of the static html page to dynamic. By using templating engines we can replace the values in html document with the actual data values. For example, if we want to show the employees and…
Error Handling in Express Js
Most of the times, the program doesn’t run successfully in the first attempt. The reason can be a syntactic error, a logical error or a runtime error. Error handling is useful in handling runtime error. If we don’t handle runtime…
Cookies in Express JS
Cookies are small piece of data that are stored on client’s browser. These are send with the request to the server and the server also sends back the cookies. Cookies helps us to store the necessary information on the client…
Middlewares in Express Js
Express Js application has a series of middleware function calls. Middlewares are also function, but with some difference, like middleware functions have access to request and response object, they can call the next middleware function. The middleware function takes 3…
Routing in Express Js
Routing refers to the way the server responds to the client’s request. There can be different routes for different http methods like get, post, etc. Routing is basically the type of response the client will get back. For example if…