Node.js Developer Notes on Body Parser Module

Body Parser Module in node.js body–parser. Node.js body parsing middleware. Parse incoming request bodies in a middleware before your handlers, available under the req.body property. Learn about the anatomy of an HTTP transaction in Node.js. This does not handle multipart bodies, due to their complex and typically large nature Installation $ npm install body-parser API var bodyParser = require(‘body-parser’) The bodyParser object exposes Read more…


Promises in Node.js-An Alternative to Callbacks

Promises in Node.js-An Alternative to Callbacks Promises are a compelling alternative to callbacks when dealing with asynchronous code. Unfortunately, promises can be confusing and perhaps you’ve written them off. However, significant work has been done to bring out the essential beauty of promises in a way that is interoperable and verifiable. Read more…


Developer’s Guide on How to Use Timers in Node.js

Timers in Node.js All of the timer functions are globals. You do not need to require() this module in order to use them. clearImmediate(immediateObject)# Added in: v0.9.1 Stops an immediateObject, as created by setImmediate, from triggering. clearInterval(intervalObject)# Added in: v0.0.1 Stops an intervalObject, as created by setInterval, from triggering. clearTimeout(timeoutObject)# Read more…

Node js

Query String Explained by Node.js Developer

Query String in Node.js querystring.escape(str) :- (str <string>) The querystring.escape() method performs URL percent-encoding on the given str in a manner that is optimized for the specific requirements of URL query strings. The querystring.escape() method is used by querystring.stringify() and is generally not expected to be used directly. It is exported primarily to allow application code Read more…