Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Node.js Redux – Updating my Node.js Skills

It has been a while since I originally posted about Node.js. We’re getting into API platforms at work so it is time for me to update my node.js skills and see what is new in the past year. In this post I’ll talk about Node.js on OS-X El Capitan using the various IDEs and training sites that I think are useful. I’ll also use this post as a place to keep track of tips and tricks I’ve picked up.

11/24/2015: Going to publish and keep this getting updated as I work with things.

Getting Everything Installed

Just ignore everything and use homebrew. On El Capitan you’ll need to fix the newly introduced security glitches, check my OS-X page if you have trouble with those. Once you have node installed then you can use npm to bring in all the add-ons you like. As I write this I am looking at node 5.1.0 and npm 3.3.12.


  1. brew update
  2. brew doctor
  3. brew install node
  4. To really be sure things are working install a package like gulp:
    npm install -g gulp (you might need to use sudo when installing globally on OS-X)

With all that you should be good to go – try “node –version” to make sure.

Development Tools

Last time I looked at Cloud9  and it is still is a nice tool for a node IDE however there are several others to look at. Sublime Text 2 is out and Brackets from Adobe is pretty nice. Sublime Text 2 costs $70, although you can evaluate forever (not recommended). PHPStorm from Jetbrains is decent as well, but you need to pay a bit more. It is great to have so many decent choices. I’m going to use a combo of PHPStorm and Brackets I guess because I use PHPStorm all the time, but I’m curious about Brackets and its features.

PHPStorm’s support for node is kinda minimal, but it does syntax highlighting and it does have an internal

Open up the settings and enable Node support for your project.

Open up the settings and enable Node support for your project.

console that you can use to start and stop node. If you are already using it for other stuff then it makes sense to use it for node. There’s a node plugin that brings some support for common features (code help, syntax highlighting, and debugging). Once you install the plugin you will need to enable it in the project settings – see the screenshot.

Training and Resources On-Line

These are some of the sites I’ve been looking thru. I do have a Lynda account and the node courses are ok, but not great. In general the on-line stuff isn’t too great. Its basic and then you are on your own so be sure to have some solid ideas about what you want to do so that you can get going right away:

  • Tutorials and workshops are pretty good
  • NodeBeginner: Getting a little dated, but still good.
  • good stuff, but you need an account
  • HowToNode: This is a great site with lots of interesting articles once you have the basics.

Interesting Packages and Frameworks

There’s been a lot going on. In my last look I really liked Express and it is definitely still the most mature framework. Sails looks interesting. It adds on top of Express and brings some very cool features for APIs and data persistence. Koa also looks interesting and is positioned as a “next generation” Express framework.

To find new packages or explore them go to the NPM Packages site.

When using npm to install packages into your project, you should “npm init” your project to create a package.json file. Then don’t forget the “–save” parameter to have the package automatically added to your package.json file:

npm install –save express

Updates the dependencies list:

  "name": "wp-api",
  "version": "1.0.0",
  "description": "Creating a node API for wordpress",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "author": "Beren Erchamion",
  "license": "LGPL",
  "dependencies": {
    "express": "^4.13.3"

Other Useful facts/tips when using npm:

  • On OS-X npm installs global packages in ~/npm/lib.
  • If you think something should work after a package is installed, check the package’s readme.
  • Use npm –prune to remove things you don’t need in your project anymore.

Express Notes and Tips:

  • Install Express with:
    sudo npm install -g express
  • Install the generator functions with:
    sudo npm install -g express-generat[email protected]
  • Create an app with:
    express myApp
  • Start the app with:
    npm start or node app

Node and Object Oriented Programming

I’ve always been a big OOP guy – C++, Java, and yes PHP. Javascript has always been a bit twitchy with OOP, perhaps because it is the only “classless” OO language that I’ve worked with. While there are a number of OOP JAvascript guides, there’s not too much on how to use OOP with Node.js. Not sure why. Here’s some good articles I’ve been reading through:

  • Introduction to Object-Oriented Javascript
  • OOP in Javascript: What you Need to Know

Async, Generators, and Fibers

This is a very interesting topic. In my slightly inexperienced view, the async model works very well for small and specific jobs, but starts to show problems with larger projects. Generator and Fibers are meant to ease this issue and bring a blend of synch and async to node projects. I’m still reading about these, but in general my use of node will be smaller things initially.

This post first appeared on Tarn Aeluin - Technology, Soapbox, And Crap..., please read the originial post: here

Share the post

Node.js Redux – Updating my Node.js Skills


Subscribe to Tarn Aeluin - Technology, Soapbox, And Crap...

Get updates delivered right to your inbox!

Thank you for your subscription