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

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

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