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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -