I’m trying to access modules but the nesting gets a bit out of hand
require("../../../Folder/Deeper/someFile")
Is there anyway to just use require("Folder/Deeper/somefile")
I’ve tried setting
require.paths = ['/media/work/Project'];
but that doesn’t seem to work and also feels a bit ugly to me.
Are there any alternatives. Is there any way to write a wrapper for this?
Maybe this?
http://nodejs.org/api.html says: