Require local files relative to the root of your node project.
Require local files relative to the path provided at require.
npm install include
var include = require('include')(__dirname);
var foo = require('../../../path/to/foo');
var foo = include('path/to/foo');
Of course you’re getting around to it, but you probably should get around to it soon. Buy a ticket »
how? learn more