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
Post a Comment