margin

Nodejs

tag: nodejs all tags →
2017
2016
2015
2014
2013
Node

Express middleware chains

2013.288

Route handlers don't need to be nested callbacks -- Express middleware chains turn them into a flat, readable sequence.

Ops

Zero-downtime deploys

2013.196

A bash deploy script and a Node.js process monitor -- SSH, pull, touch a file, the cluster reloads. No CI, no dashboard. The terminal.

Node

Sorting by multiple fields

2013.179

A composable predicate function for sorting arrays of objects by multiple fields -- with reverse, primers, and short-circuit evaluation.

Craft

Node.js style guide

2013.051

Our team's Node.js conventions -- error-first callbacks, early returns, callback alignment, and the formatting rules we drilled into every new developer.

Craft

Starting over

2013.036

Ditching WordPress for a custom Node.js blog engine powered by libgit2 -- git as the content store, markdown as the writing format, npm for everything else.

2012
Craft

The dispatch desk

2012.264

A basement, a barcode scanner, and the moment the dispatch desk stopped waiting.

Node

Connection pooling

2012.202

The Node.js MySQL driver doesn't pool connections. Under load, you run out. Fifty lines with generic-pool fixes it.

Node

URL mapping in Redis

2012.162

Loading every product, category, and brand URL into a Redis hash at startup, and a middleware that rewrites requests before Express sees them.