Node.js on the command-line

To start, let me put it out there that I’ve drank the kool-aid and have been
doing a ton of hacking with Node.js (and soon enough, IO.js). I’m going to save
the details for another post though. So an observation I’ve been making recently
is that it seems like the majority of folks that code in Node seem to only be
building web sites. Granted that doesn’t include the folks that build
NodeBots or anything like that.

This became very apparent when my buddy Justin wrote a post about
Using Command Line Arguments in a Node Script. The post blew up,
generated a ton of traffic for him and was featured in some newsletters and
even a fucking video! What blew both of our minds is how much traction, what
seemed like a common knowledge topic, was able to generate. The fact is, Node
is slated as a system for building web pages for a lot of people.

Don’t get me wrong (actually get me wrong and blow up my comments box) there are
a ton of web frameworks for Node, but that doesn’t mean it needs to be typecast.
Perhaps the issue isn’t even that it’s being typecast, it’s just that JavaScript
as a whole attracts web developers and not necessarily folks that can command
the entire stack.

For me, right now, Node’s occupying a sizable chunk of my toolbox but the bullk
of what I do with it is on the command-line. The asynchronous nature of Node
doesn’t always fare well when building scripts, but it can definitely be done.
If I can’t make it work by writing a shell script, I’m going to reach for Node,
most likely with the --harmony flag 😉

Using Node.js on the command-line? Post your projects below!

Josh Sherman - The Man, The Myth, The Avatar

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.

If you found this article helpful, please consider buying me a coffee.