Starting Out With Node Js

So I’m going to start playing around with Node Js. Since this will be my first go at it, I’m going to keep it fairly simple. My game plan is to use Windows Azure to host a simple website for my father’s business. I’m going to use Node js on the server and, to keep with the js theme, build my site using durandal js (a client side javascript framework). I usually develop on a PC, but for this, I’m going to try it out on a mac. We’ll see how I do without good ol’ Visual Studios..


Quick introductions for those who are wondering what these are. Node js “Event-driven I/O server-side JavaScript environment based on V8.” V8 is google’s JavaScript engine. Pretty cool stuff, check out more on the Node Js site. Durandal Js is client side framework that can help you make rad SPA (Single Page Applications). Read more about Durandal js here. You may be wondering why I’m doing so much for a simple website. Well this is a learning experience for me as well, so I’m going to use tools that can be used for larger applications practically. 


Getting started, first thing I did was set up my Azure account. This is pretty straight forward, go here. I’m not 100% on this yet, but I think Azure will let you host 10 webpages for free. Pretty nice and it’s cloud, so we don’t have to do much server work. Next, I installed GIT. You can set one up an account here at there GitHub site. Once I had it installed, I ran through their tutorials on setting up my first repo. It was really easy, just follow the instructions on GitHub. Next, I installed Node on my machine. You can do this a few ways. First, you can go to their downloads page and press the classic download button (simple method, but can be limiting). Also, they have the source code up for the project on their GitHub. I don’t really recommend building it yourself, but you can, and you can also look into the node plumbing here. Finally, you can use a nice tool call nvm which you can use to download and manage your node installations, along with some other cool features I will use later. I choose this option because Node is a rapidly evolving system, and nvm will help me manage and switch between the different environments I have installed. It is similar to ruby’s rvm if you are familiar with that. To get nvm installed on your machine, check out their installation documentation on their GitHub. If you have already installed GIT to your machine, I recommend using curl | sh command method to install nvm, worked like a charm for me. They have the good instructions on GitHub on doing this and on installing the latest version of node using nvm, so just consult with those instructions. 


So that is all of the intro work. In the next post I’ll actually get to creating something


GIT Repo, memosa, Azure