Blog Archives

Middleware

Tweet we have used existing middleware (body-parser, cookie-parser, static, and connect-session, to name a few), and we’ve even written some of our own (when we check for the presence of &test=1 in the querystring, and our 404 handler). But what

Posted in Express, Node.Js Tagged with: ,

Developing template engines for Express

Tweet To develop template engines for Express ,Use the app.engine(ext, callback) method to create your own template engine. ext refers to the file extension, callback is the template engine function which accepts the location of the file, the options object,

Posted in Express, Node.Js Tagged with: ,

Response Object ?

Tweet The response object (which is normally passed to a callback, meaning you can name it whatever you want: it is common to name it res, resp, or response) starts its life as an instance of http.ServerResponse, a core Node

Posted in Express, Node.Js

Request Object ?

Tweet The Request Object The request object (which is normally passed to a callback, meaning you can name it whatever you want: it is common to name it req or request) starts its life as an instance of http.IncomingMessage, a

Posted in Express, Node.Js Tagged with: ,

Cluster ?

Tweet A single instance of Node runs in a single thread. To take advantage of multi-core systems the user will sometimes want to launch a cluster of Node processes to handle the load. The cluster module allows you to easily

Posted in Node.Js Tagged with:

Express JS to Deliver HTML Files (1)

Tweet How to load and “display” a basic HTML file : There are many ways to simply send the html file using the node’s core api of using the readfile,but the easy way to do is using the Express Framework

Posted in Express, Node.Js

Node JS to Deliver HTML Files

Tweet Node JS to Deliver HTML Files: The HTTP module is used to start up HTTP servers and respond to HTTP requests from users. The fs module is used to read the file system.Node js to deliver the html file

Posted in Express, Node.Js Tagged with:

Express JS to Deliver HTML Files

Tweet How to load and “display” a basic HTML file : There are many ways to simply send the html file using the node’s core api of using the readfile,but the easy way to do is using the Express Framework

Posted in Express, Node.Js Tagged with: ,

Callbacks ?

Tweet What is Callbacks : You pass a function reference as a parameter to another function so that it can be executed at a later time function f1(a){ } function f2(b){ var a=10; b(a); } f2 (f1); Here i am

Posted in Javascript, Node.Js Tagged with: ,

Domain Module

Tweet A Node module called domain was introduced in Node 0.8.0 for handling errors. A domain module is like a flexible error handler for any and all errors that might be thrown within it. Using domains is the recommended method

Posted in Node.Js Tagged with: