background preloader

NodeJS

Facebook Twitter

NodeJS Tutorials

NodeJS Libraries and Utilities. Nodejs. Node.js. 6 Must Have Node.js Modulesblog. So you're thinking about using node.js: awesome. If you're new to the community you're probably thinking "what's the best node.js module / library for X? " I think it's really true when experienced language gurus say "80% of your favorite language is your favorite library.

" This is the first in a series of articles will give you a high-level overview of some of our favorite node.js libraries at Nodejitsu. Today we'll take a look at these libraries: cradle: A high-level, caching, CouchDB library for Node.js findit: Walk a directory tree in node.js node_redis: Redis client for node node-static: RFC2616 compliant HTTP static-file server module, with built-in caching. optimist: Light-weight option parsing for node.js xml2js: Simple XML to JavaScript object converter. If you're using CouchDB you should be using cradle. A common set of problems that I see on the nodejs mailing list are advanced file system operations: watching all the files in a directory, enumerating an entire directory, etc.

Nodetime | Performance Profiler for Node.js. Node.js PaaS: Nodejitsu (part 1 of 3) - startups & node.js. Why should I get started with Node.js? - rain. Blazing fast node.js: 10 performance tips from LinkedIn Mobile. In a previous post, we discussed how we test LinkedIn's mobile stack, including our Node.js mobile server. Today, we’ll tell you how we make this mobile server fast. Here are our top 10 performance takeaways for working with Node.js: 1. Avoid synchronous code By design, Node.js is single threaded. Unfortunately, it is still possible to make synchronous/blocking calls. Our initial logging implementation accidentally included a synchronous call to write to disc. 2. The Node.js http client automatically uses socket pooling: by default, this limits you to 5 sockets per host. 3. For static assets, such as CSS and images, use a standard webserver instead of Node.js. 4. Let's quickly compare rendering a page server-side vs. client-side.

Note that everything on this page, except for the user's name, is static: that is, it's identical for every user and page reload. The rest of the page - all the static HTML markup - can be put into a JavaScript template (such as an underscore.js template): 5. 6.