Require files relative to your project root.
Status - DEPRECATED - use ES6 modules, instead
npm install --save rootrequire
var root = require('rootrequire'), myLib = require(root + '/path/to/lib.js');
- You can move files around more easily than you can with relative paths like
- Every file documents your app's directory structure for you. You'll know exactly where to look for things.
- Dazzle your coworkers.