Node.js Streams, Pipe and chaining

A stream is an abstract interface implemented by various objects in Node.js.  Due to asynchronous and event driven nature Node.js is very good at handling I/O bound tasks/streams, streams are actually unix pipes. For example a request to an HTTP server is a stream, as is stdout. request is a readable stream and response is a […]

Introduction to WebSockets – Server, Client examples using Node.js

Initially the paradigm about web was Client/Server model, in which client’s job is to request data from a server, and a server’s job is to fulfill those requests. This paradigm fulfills the web requirement for number of years, but later on with Introduction of AJAX makes us enable to communicate with server asynchronously. Now using AJAX it was easy […]

Express.Js Middleware, What is next()?

You may have noticed use of next() function while looking at node.js code. Express is a routing web framework which utilize essentially a series of middleware calls. piece of code for a simple route could be like bellow.

and with a additional parameter next

So what is next() doing here. In the example, for instance, you […]