Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active January 23, 2026 10:31
The introduction to Reactive Programming you've been missing
@branneman
branneman / better-nodejs-require-paths.md
Last active January 10, 2026 23:54
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions