Welcome!

Technology Entrepreneur, Innovator, Author and Thought Leader

Shashank Tiwari

Subscribe to Shashank Tiwari: eMailAlertsEmail Alerts
Get Shashank Tiwari via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Ubuntu Linux Journal

Blog Feed Post

Getting Started with Node

The best and most reliable way to get Node installed on your machine is to build it from source

Node.js, the V8 (Chrome’s JavaScript runtime) based platform for building fast and scalable network applications,  is gaining substantial traction among developers and entering the application stack of many silicon valley companies. Like every new technology or piece of software there is enough FUD (Fear, Uncertainty, and Doubt) around Node, so I am going to write a few blog posts and help you learn Node by example.

In this post, I will simply help you get set up so you can start playing with Node. The best and most reliable way to get Node installed on your machine is to build it from source. On Linux, Unix, and Mac OSX, you can start out by getting Node source code from its repository like so:

git clone https://github.com/joyent/node.git

This assumes that you have a git client installed for your *nix flavor and you are familiar with the essential notions of git, like cloning a repository. If you are completely new to git, then you may want to quickly read and learn about git first. A good freely available resource on git is the book titled: Pro Git — http://git-scm.com/book/.

Now that you have the Node source cloned on your machine, change to the source directory and inspect the available tags in the repository as follows:

git tag -l

A whole lot of tags will be listed in response to this git command. Some of the latest ones are follows:

...
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.7.9
v0.8.0
v0.8.1
works

The current master branch of the Node code is v0.9.x but unfortunatley that version seems to have problems working with NPM (Node Package Manager), a very important companion of Node. Therefore, you should checkout v0.8.1 before you build the source. To checkout the v0.8.1 tag, use the following command:

git checkout v0.8.1

From here onwards, its the usual configure, make, and make install trio. Build Node as follows:

./configure
make
sudo make install

That’s it! Node and NPM are both installed.

To verify, open up a terminal and run

node -v

If you see v0.8.1 in response then you are all set.

Additionally, verify that npm is installed by running

npm -v

You should see 1.1.33.

Now that node is installed, you are ready to play with node. In my next post, we will get started with a simple example.

Read the original blog entry...

More Stories By Shashank Tiwari

I am a technology entrepreneur, innovator, author and, as some say, a “thought leader”. I like to solve challenging computing problems, especially those that drive innovation. Being a polyglot programmer, I can program fluently in many languages, including Java, Python, C++, C, Ruby, ActionScript, JavaScript, Objective-C, Haskell, Scala, Clojure, PHP, Groovy, Lisp and Perl. I must admit that I like to learn programming languages and if there is a new interesting one coming, I wouldn’t be far behind getting to grips with it. Over the last many years I have built some cutting edge enterprise and consumer software applications, many of which have leveraged large data sets and the web based programming paradigms. This means I also know a lot about data bases and persistence. I am very conversant with relational databases, embedded databases, object databases, text based data and XML. Having leveraged web based programming paradigms, I have first hand experience with a lot of web development frameworks, including but not limited to Adobe Flex, Spring MVC, Rails, Grails and Django. Not to forget, I obviously have worked a lot with HTML, JS and CSS. My experience and interest are varied and diverse and range a wide spectrum of application development realms that include the server, the client and the middleware. Besides, programming, I am also deeply interested in mathematics and theoretical computer science. This motivates me to bring my knowledge of applied mathematics, statistical modeling, artificial intelligence and sometimes simply data structures, to good use, when I build applications. A couple of domains like financial mathematics and scientific computing seem to have been good fit for such expertise. I am an ardent supporter of open source software and try and contribute to open source code bases and causes. I like the plurality and variety that software development offers; the choice of programming languages, the abundant availability of tools and libraries, the existence of multiple operating systems and the possibility of varied software development methodologies. As a member of the technology community, I am an active contributor to the ever evolving software development languages, methodologies and standards. I am an expert group member on a number of JCP (Java Community Process) specifications, for example JSRs 274, 283, 299, 301 & 312, and have been recognized as an Adobe Flex Champion.I run and organize a few community events like Flex Camp Wall Street, Show Ramp and Polyglot World. I bring together all my expertise in terms of services and products via my primary venture, Treasury of Ideas LLC, in which I play the role of a Managing Partner. Treasury of Ideas LLC, through its focus on innovation and value optimization, offers many best of the breed services and products and has incubated many ideas to help translate them to reality. Our clients range from large enterprises, government agencies, not-for-profit organizations to promising new startups. I write regularly in many technical journals and magazines, present in seminars and mentor developers and architects. I have authored a few books, including Advanced Flex 3 (friends of Ed/APress, 2008) and Professional BlazeDS (Wrox/Wiley, 2009) , and am in the process of authoring a few more. You can learn all about my books and public talks by browsing through the Publish & Present page at www.shanky.org.