Node.js / Export configuration file -


i have following configuration file in /etc/sysconfig/myconf:

export user=root export node_dir=/opt/mydir 

i want use these setting in .js file, located in /opt/myapplication:

var userapp = //user in /etc/sysconfig/myconf file var dir = //node_dir in /etc/sysconfig/myconf file 

is there way without open file , parse contents?

as understand export should give me option read in node.js, don't find how (in addition, when run export -p, don't see these variables)

edit: search equal node.js's command source command in linux (the variables not environment variables)

if environment variables available when launch program, can use process.env. https://nodejs.org/api/process.html#process_process_env


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -