Technology

What are middlewares in express

Middleware is a simple javascript function with three parameters request, response and next Apart from handling http request it can perform the following tasks: Manipulate request and response objects Perform isolated tasks Terminate request flow by sending response Pass the control to another middleware We load middleware...

by Satyam Chaudhary
Tag: expressjs
17-Feb-2016

Technology

Layouts in Dust.js

For building an application with user friendly and consistent UI, we generally use the concept of "master page" and "layouts", so that just the content can vary within the pages. This helps user to easily navigate through the website as well as faster loading of the web pages. For example, generally we make header and footer static...

by Sakshi Tyagi
Tag: expressjs
12-Mar-2014

Technology

Dust your views

In our node js application, we can use variety of templating engines like "jade" , "ejs", "mustache" etc. Dust.js is an asynchronous templating engine which can be used both on server side as well as client side and provide easy caching with high performance. In my previous blog on EJS as a templating engine, i have mentioned how we...

by Sakshi Tyagi
Tag: expressjs
11-Mar-2014

Technology

ExpressJS: Route Parameter Pre-conditioning

Express JS is a very flexible yet powerful framework on top of exponentially growing Node JS Environment. Express makes it really easy to handle requests and how the server interacts with the outside world. It is very simple to get going and it has immense amounts of extremely useful features, Middleware is one of those features of...

by Manoj Nama
Tag: expressjs
08-Sep-2013

Technology

Node.js: Getting started with Express.js and MongoDB

In my previous post, I explained how to get started with node.js and executing your first script with node. Now in this tutorial, we will go a step ahead and learn using Expressjs and MongoDB. For people who are new, Express is a web application framework for node which provides a set of features that can be used to build single-page as...

by Suroor Wijdan
Tag: expressjs
08-Feb-2013