SyntaxFix
Write A Post
Hire A Developer
Questions
I use process.cwd() in my projects. For example:
process.cwd()
var Foo = require(process.cwd() + '/common/foo.js');
It might be worth noting that this will result in requireing an absolute path, though I have yet to run into issues with this.
require