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

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

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -