1.0.5 • Published 10 years ago
node-include v1.0.5
node-include
This module replaces require so you can require files relative to the root of your project.
// server.js
global.include = require('node-include');
// some-file.js
var anotherFile = include('/root/relative/path');
This would require the file located at the path 'root/relative/path' relative to the base directory of your project (under the assumption that server.js is in the root directory).