Kill Node.js!

UPDATE: (4-24-2014) added additional ways to do this based on feedback from the community on twitter! Thanks guys!

Nope! Not what you think, or maybe hoping to find.  Remember, I am an accused “Nodejs Fanboy.”

Ever get stuck with the dreaded:

Error: listen EADDRINUSE

It can put a damper on your day, but never fear.  That error just means that another instance of that particular Node.js program is running, and you need to kill it to start it up again.  When ctrl-c doesn’t work (Mac or Linux) then you need to get all “greppy.” (Yes, greppy is a real serious technical term).

Hit the command line and type this:

ps aux | grep node

Then check for the process ID and type:

kill -9 <the process id you want to kill>

Hope you find this usefull, and remember, most of these posts are for me to remember what it was I did that “one time.”

Additional ways to do this:

A shout out to some awesome folks in the community who tweeted me alternative ways to kill Nodejs.  Thanks folks!

From: @ahmetalpbalkan   Run this command>  killall node

From: @tjanczuk   Run this command>  kill -9 $(pgrep node)

Node.js and C have a conversation about the JVM ..

So I am a huge fan of Tucker and Dale vs Evil as well as being a “fanboy” of Node.js.  Well, for those who don’t know me I have an odd sense of humor, deadpan tongue and cheek.  So don’t freak out, it’s just an amusing “TO ME” thought that just ran through my head…  I have nothing against the JVM.

The part of Tucker will be played by NodeJS, while the part of Dale will be played by C.  The scene is …. (can’t give the spoiler, see the movie)

Node.js: All right… I know what this is.
C: What?
Node.js: This is a suicide pact.
C: It’s a what?
Node.js: These kids JVMs are coming out here, and killing themselves all over the woods  servers.
C: My God, that makes so much sense.

Tucker and Dale, I mean Node.js and C discuss the situation

Object-Oriented JavaScript Book Review

The Principles of Object-Oriented JavaScript was a pleasant surprise. I spend a lot of time reading various books on JavaScript and have noticed that OO JS is glossed over. Yes, prototypical inheritance means we do not write Classes, but that doesn’t keep you from writing JavaScript in an OO fashion.
The author, Nicholas Zakas, has always been a strong writer and I have found his other texts to be very easy to read and pickup various things that have helped me. There is no question as to the knowledge of the author or his ability to convey the information in an easy to digest manner.
I feel chapter 4, Constructors and Prototypes, and chapter 6, Object Patterns, make this book worth the money alone. The author also continues to cover Functions (and how to really leverage them), as well as the core basics that trip up many folks such as Primitives and References.
If you are serious about improving your JavaScript skills, or are just beginning to work with the language you should seriously consider adding this book to your library.

On a side note, the technical reviewer for the book was Angus Croll, and the forward was written by Cody Lindley.  If you don’t know who those cats are then you should look’em up.  They are what some folk might refer to as “legit” when it comes to JS.