Quantcast
Channel: How To Node
Browsing latest articles
Browse All 134 View Live

What is "this"?

Most people that learn JavaScript are coming from a background in another language. This brings with it a view of how the world works that may be different from how it really works in JavaScript. For...

View Article


Image may be NSFW.
Clik here to view.

Facebook Connect with Node

A big part of building a new web application is repurposing common patterns, one such pattern is the ability for users to sign in and out. One way of solving this quickly is by using Facebook Connect....

View Article


Hello Node!

In programming literature it has become the standard to create a hello world program as the first example. This article will go through a few simple hello world type examples with everything from...

View Article

Image may be NSFW.
Clik here to view.

The Step of the Conductor

There have been several async management libraries proposed and written. I'm guilty of at least three of them. The reason for this proliferation of code is that they're all trying to solve a very real...

View Article

Image may be NSFW.
Clik here to view.

Volcano Wheat

Announcing the release of a new engine for howtonode.org, Wheat! Also in honor of those stuck in Europe trying to get to jsconf, the background is a photo of the icelandic volcano.VolcanoGerman air...

View Article


Creating Custom Modules

Node implements CommonJS Modules 1.0. Node's full API doc. explains their use thoroughly, but can be a bit tricky to get started.This tutorial explains the why and how you can use Node's module system...

View Article

Image may be NSFW.
Clik here to view.

Just Connect it Already

Now that the core APIs of node are really starting to stabilize, I'm moving my attention to helping stabilize the framework scene. One of the things I found really neat from Ruby was the Rack server...

View Article

Why use "closure"?

One of the greatest features of the JavaScript language is closure. I've discussed this concept some in the "What is This?" article. There I was explaining scope and context. Today I wish to explain...

View Article


Deploying Node Apps with Spark

This article will go through building a simple RESTful key/value store using Connect. Then I'll explain my favorite way to host apps on Ubuntu Server. This will use upstart and Spark. We'll setup the...

View Article


Image may be NSFW.
Clik here to view.

Shoutbox with Grasshopper and CouchDB

This article demonstrates how a simple shoutbox can be built with Grasshopper using CouchDB for storing the shouts. It is inspired by this article on Nettuts+. I have included the design artifacts from...

View Article

Demystifying events in node.js

Ok, here's an important thing to understand when you're working with node.js. There're lots of node objects that emit events, and you can easily find some examples on the documentation. But what's not...

View Article

Flow Control in npm

Flow control is a popular subject in NodeJS. Since most of us learned synchronous object-oriented programming patterns in school, it can be a bit of a shift to really leverage asynchronous functional...

View Article

How to Install Node.js

This was the first in a series of posts leading up toNode.js Knockout on how to use node.js.I have been given permission to repost the articles from the contest here (in wheat format) for general...

View Article


Getting Started with Express

This was the second in a series of posts leading up toNode.js Knockout on how to use node.js. This post was written by guest author and Node.js Knockout judgeTj Holowaychuk and iscross-posted on his...

View Article

Introduction to npm

This was the third in a series of posts leading up toNode.js Knockout on how to use node.js.npm is a NodeJS package manager. As its name would imply, you can use it to install node programs. Also, if...

View Article


Debugging with node-inspector

This was the fourth in a series of posts leading up to Node.js Knockout on how to use node.js. This post was recorded by node-inspector author and Node.js Knockout judge Danny Coates.VideoCheck out...

View Article

An Introduction to Geddy

This was the fifth in a series of posts leading up toNode.js Knockout on how to use node.js. This post was written by geddy author and Node.js Knockout judge Matthew Eernisse.Geddy is a modular,...

View Article


Node.js and MongoDB

This was the sixth in a series of posts leading up toNode.js Knockout on how to use node.js. This post was written by 10gen and is cross-posted from their blog.10gen is the corporate sponsor of...

View Article

Websockets everywhere with Socket.IO

If you've stayed on top of the advances in the realtime web for the past few years, you've probably heard of different techniques aimed to reduce the latency (ie: speed) of the message exchange between...

View Article

Intro to Jake - JavaScript build tool for Node.js

Jake is a JavaScript build program for Node.js, with capabilities similar to GNU Make or Ruby's Rake. If you've ever built projects with Rake, you'll be very at home using JakeJake has the following...

View Article

Image may be NSFW.
Clik here to view.

Capturing Packets in JavaScript with node_pcap

OK, I hear you. Capturing packets is hard and best left to kernel hackers, assembly language programmers, and black hat security researches. If you just want to make things for the web using node.js,...

View Article


Testing your JavaScript with shoulda.js

The last thing you want this weekend is to be introducing bugs at 4:30PM on Sunday as you frantically hack in more functionality. One way to avoid that risk is to write some tests for your critical,...

View Article


Image may be NSFW.
Clik here to view.

Learning Javascript with Object Graphs

One of the secrets to being a super effective JavaScript developer is to truly understand the semantics of the language. This article will explain the basic elemental parts of JavaScript using easy to...

View Article

Image may be NSFW.
Clik here to view.

Learning Javascript with Object Graphs (Part II)

The first article using graphs to describe JavaScript semantics was so popular that I've decided to try the technique with some more advanced ideas. In this article I'll explain three common techniques...

View Article

Image may be NSFW.
Clik here to view.

Learning Javascript with Object Graphs (Part III)

Part I of this series explained basic object graphs and visually described references, closures, and basic inheritance in JavaScript. Part II compared different styles for doing object-oriented...

View Article


Image may be NSFW.
Clik here to view.

Creating safe and composable 'mixins' with traits.js

In this article I will introduce traits.js, a small library to define, compose and instantiate traits. Traits are reusable sets of properties and form an alternative to multiple inheritance or...

View Article

Node.js and Redis Pub-Sub

This is the 7th in a series of posts leading up to Node.js Knockout on how to use node.js. This post, cross-posted from GitHub, was written by James Bracy, founder of Redis To Go. Redis To Go is a dead...

View Article

Image may be NSFW.
Clik here to view.

Realtime Performance Visualizations using Node.js

This article outlines how to create a realtime heatmap of your syscall latency using HTML5, some great node modules, and DTrace. It was inspired by talk that Bryan Cantrill and Brendan Greg gave on...

View Article

How To Module

UPDATE:This article was written for Node v0.4.1 and is no longer applicable. As of node.js 0.6.3 NPM comes pre-installed.These are some basic steps for writing a NodeJS module.Most of the suggestions...

View Article



Fun Putting Node on Mobile Devices

This article will walk you through creating an Ubuntu image that can be chrooted inside a mobile device like the recently released TouchPad. Once the Ubuntu environment is setup we'll learn how to...

View Article

A Simple Blog with CouchDB, Bogart, and Node.js

Update: By request I have posted a gist of the app.js using MongoDB instead of CouchDB. This gist also serves as a beginning example for how to use non-promise-based APIs with bogart.In this article,...

View Article

Managing module dependencies

Following this discussion on the node.js mailing list about managing module dependencies, I thought it's worth sharing some pointers on that here.Using NPM to bundle your module dependenciesIf you're...

View Article

Easy HTTP Mock Testing with Nock and node-tap

One of my first node.js libraries was nano: A no fuss CouchDB client based on the super pervasive request. In foresight that was a good idea, even though there's a ton of clients for CouchDB none of...

View Article


Asynchronous Control Flow with Promises

A Promise is an object that represents the result of an asynchronous function call. Promises are also called futures and deferreds in some communities.Goal of this ArticleThe goal of this article is to...

View Article

Testing Private State and Mocking Dependencies

During Christmas I've been working on Testacular and found some tricks how to make my testing life easier. It's nothing special at all, just a simple way how to access private state of a module and how...

View Article

Understanding process.nextTick()

I have seen quite a few people being confused about process.nextTick(). Let's take a look at what process.nextTick() does, and when to use it.As you might already know, every Node application runs on a...

View Article


Really simple file uploads with Express

Few days ago I was working on a fairly typical web application and I faced the challenge of implementing a fairly typical web application feature - file uploads. It was the first time I was...

View Article


Node.js and MongoDB - Getting started with MongoJS

It won't be an exaggeration if one claims that in the past few months Node.js and MongoDB have literally taken the software and web industries by storm.Not just bleeding-edge startups but even medium...

View Article

Sending e-mails with Node and NodeMailer

Sending e-mails with NodeJS is almost a breeze. Almost. First, you have to plug-in the NodeMailer module than set up a transport type, load the templates, add attachments and finally send...The CodeThe...

View Article

Make Your Tests Deterministic

Non-deterministic issues like race conditions or thread deadlocks are very difficult to test, because they are by nature hard to reproduce. Fortunately, in the JavaScript world, we only have a single...

View Article

Session-based Authorization with Socket.IO

Finding a decent article about session based authorization in socket.io is more difficult than one expected. This article will show how you can take advantage of Express session middleware and...

View Article


Content Syndication with Node.js

Web syndication is a must for any Website wishing to share some entries easily to other systems. Better known under their format name like RSS) or Atom), they can be quite time consuming to generate...

View Article

Daddy, what's a stream?

At dinner tonight, I was discussing that I've been thinking about streams and how to simplify them in JavaScript. My 7-year-old perked up and asked me:Daddy, what's a stream?I explained that a stream...

View Article


Image may be NSFW.
Clik here to view.

Simplifying Chores with Grunt

Often in various stages of development we perform repetitive tasks e.g minification, compilation, unit testing, linting and we would definitely want to automate them. But each of these task require...

View Article

Generators vs Fibers

Both ES6 generators and node-fibers can be used to block a coroutine while waiting on some I/O without blocking the entire process.This means that you can wait for an I/O result within your code but...

View Article


Mocking Dependencies using [rewire]

Despite all my efforts to try to encapsulate some of my code into my modules, I was always founding myself exposing too much just for unit testing purpose. And even thought, it was often very complex...

View Article

Solving Coding Challenges with Streams

My first experience using Node.js for a programming challenge was agonizing. I devised a viable solution, but I couldn’t figure out an effective way to parse the input. The format was painfully simple:...

View Article

Image may be NSFW.
Clik here to view.

Node.js For Beginners. Deploy Your Blog to Heroku

Error pages are not what typically appear on your screen when you're surfing the web, but when it happens it's so annoying! To see how servers work from within, we will build a simple web server by...

View Article

Turbo Charge your NodeJS app with Cache

Caching is great for your apps because it helps you to access data much faster when compared to the database. On the downside, querying is limited and it is very expensive (money-wise) because all the...

View Article


Store data with CloudBoost's CloudObjects

CloudBoost is a Database Service with storage, search and real-time capabilities. Think of CloudBoost as Parse + Firebase + Algolia all combined into one. CloudBoost has SDK's in multiple platforms...

View Article

Browsing latest articles
Browse All 134 View Live