I'm using Node.js and want to split my code into separate files. However, it seems quite verbose to require
these modules in a reliable way.
For example:
var module = require(path.resolve(__dirname, "./file.js"));
Furthermore, if the file is in a different folder, I'll need to deal with relative path mayhem.
It seems like quite a simple problem, but my research hasn't yielded a solution. Thanks for you time.