javascript - How to get document root in sailsjs? -


to read file located in document root of sails project use absolute path.

/var/www/project/file.conf 

how can document root path in sails? or how can read file in controller using relative path?

since main application file app.js in root folder, process.cwd() should work fine you.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -