tag : Node.js

No More Global Npm Packages (Part 2)

In a previous article that I wrote earlier this year, I talked about eliminating project dependencies that needed to be installed globally, such as Grunt, Gulp, Browserify, WebPack, etc. Of course, I didn’t argue for eliminating these packages, just replacing the -g flag with a --save or --save-dev flag when installing them with npm install and then using npm scripts to execute the binaries. Well, there’s more…

No More Global Npm Packages

The JavaScript development community has been welcoming new and powerful tools by the dozens each year, almost too fast for mortals to keep up with. Many of these tools come with npm packages that you can install globally so you can use the command line tool from anywhere on your computer. This can be very convenient, but is it the right way to do it? Is there a better alternative?

Dependency Injection With Node.js

Recently, I went over Dependency Injection to help you understand a simple way to decouple your code a little bit and help your testing out. Sometimes, though, in Node.js a module will depend on a system API provided by Node, which can make it pretty difficult to make sure that private dependency is being used properly. Normal dependency injection doesn’t work in this situation, but don’t give up hope just yet.

Making a Node.js Command-Line Utility

Today, we’re going to cover how to turn your Node.js script into a native command-line utility, and then how to share it with the world using NPM (Node Package Manager). In the video, I’m using the trial-and-error approach to show you everything that is required and show the errors you might encounter along the way if you forget a step. It’s actually quite simple.

Minecraft + Node.js + Socket.io = Awesome

Have you ever found programming extremely enjoyable? I hope so, otherwise you probably shouldn’t be programming. Well, either way, I found a whole new way of making programming fun: integrating new programming technologies to make your games even easier to use! In this article in video, I show you how I gave myself and my friends the ability to completely control my Minecraft servers through a simple web application interface using Node.js and Socket.io.

Automatic Minification With Node.js and RequireJS

Last time we talked about how to use NPM and some of the command line utilities that you can install that are built using Node.js. Today, we’re actually going to build a small command line utility ourselves that can be a bit of a time saver. We’re going to use the RequireJS optimizer to automatically concatenate and minify our CSS files the moment any of them are changed.

NPM and Using Node as a Command Line Tool

Node.js was made to bring JavaScript to the web server so that people could use the same language on their front and back end, but that’s not its only possibility. Though it might not be extremely well suited for it, Node.js can still allow you to run command line tools easily. Many of the packages on NPM are command-line tools that make your workflow much smoother. Let’s take a look at some.

Node.js for True Beginners

I remember trying to get into starting with Node.js months ago and, to be frank, it wasn’t the simplest process. Installation was a hassle, and pretty much required the use of a Linux of Mac computer. Now, Node.js has evolved to the point where just about anyone can get started using Node.js (maybe not my grandparents, but they don’t even have a computer). Let’s get started!

Backbone Application Walkthrough Part 5: RequireJS - Video Tutorial

Finally! We’ve made it to the end of the Backbone.js Application Walkthrough video tutorial series. In this final video, we make few small adjustments for the sake of organization and a bunch of other changes that convert the application to work using RequireJS. Almost every file gets touched in this video, but each only receives minor changes in order to create an overall major change in modularity and optimization.

Getting Started With Node.js and Express 3

I suspect quite a few of those starting with Node are interested in using it for web development. Of the web frameworks available for Node, Express is leading the pack. And version 3 is in beta. I’m just getting started with Node and Express, so I thought I’d help you all get up and running that much more quickly. I won’t get into the boring details of installing Node and NPM. That part is especially easy now that they have Windows and Mac installers available on the Node website.