To read a file located in the document root of the sails project I currently use an absolute path.
How can I get the document root path in sails? Or how can I read the file in a controller by using relative path?
Since the main application file is
app.js in the root folder,
process.cwd() should work just fine for you.
in Sails the root path is: sails.config.appPath