6 Must Have Node.js Modules

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:

 

  1. cradle: A high-level, caching, CouchDB library for Node.js
  2. findit: Walk a directory tree in node.js
  3. node_redis: Redis client for node
  4. node-static: RFC2616 compliant HTTP static-file server module, with built-in caching.
  5. optimist: Light-weight option parsing for node.js
  6. xml2js: Simple XML to JavaScript object converter.

Continue reading

Node.js modules you should know about: optimist

Hey everyone! This is the second post in my new node.js modules you should know about article series.

The first post was about dnode – the freestyle rpc library for node.

This time I’ll introduce you to node-optimist – the lightweight options parser library. This library is also written by James Halliday (SubStack), my co-founder of Browserling and Testling.

Wonder how lightweight an options parser can be? Check this out: Continue reading

Node.js modules you should know about: dnode

Hey everyone! I am starting a new article series called node.js modules you should know about. I have been using node for over 2 years now and I built Browserling startup using node so I know just about everything about it. I also have written about 20 node.js modules myself (see my github).

In this series I will go through a few dozen of node.js modules, give examples and explain where it’s useful.

The first module in the series is dnode. Dnode is freestyle rpc library and it’s written by James Halliday (SubStack) ― co-founder of Browserling and Testling. Continue reading

Tutorial: How to Deploy Node JS Applications, With Examples

Note: This is a living document! To get the most recent information (and the example files),look here, on GitHub. To clone the example:

 

 

git clone git://github.com/Miserlou/NodeDeploy.git 

Intro

I’ve recently learned how to program Node.js applications. I couldn’t find tutorial on how to deploy it in the way I wanted to, so I figured out a solution and this is what I’ve learned.

Node is a really refreshing way to program, and it’s turned me from a JavaScript hater into a fan. Everything is event driven, it’s highly scalable, and, with Socket.IO, you can make very cool, interactive and collaborative applications. It’s also quick, it has a great package manager, and there is a healthy and young community. Continue reading

Run Node.js as a Service on Ubuntu

The core of our new project runs on Node.js. With Node you can write very fast JavaScript programs serverside. It’s pretty easy to install Node, code your program, and run it. But how do you make it run nicely in the background like a true server?

Clever chaps will have noticed you can just use the ‘&’ like so:

1
node ./yourprogram.js &

and send your program to the background. But: Continue reading

Node.js Step by Step: Introduction

Node.js is an amazing new technology, but, unless you’re specifically a JavaScript developer, the process of becoming acquainted with it can quickly become a bit overwhelming. But that’s why we’re here! If you want to really learn how to use Node.js, this set of articles and screencasts will do the trick. Continue reading

Taking Baby Steps with Node.js – Threads vs. Events

In a previous blog post, I provided a shallow introduction to Node.js. I also mentioned where you can find more information on how to get it installed on Windows as well as how to install a seemingly popular package manager in the JavaScript community called Npm.

In the mean time, I’ve started to get a more clearer view on the general concepts on which Node.js is based on, as well as the kind of applications that can be built using this server-side platform. The more I read and learn about Node.js, the more I come to the conclusion that it is very much targeted towards building real-time applications. Google Wave, Friendfeed and most recently Facebook are popular examples. You can also read this article to learn more about other examples of real-time web applications. Continue reading