Node.js

Node.jsで環境変数を参照する

More than 5 years have passed since last update.

process.envにいろいろ入ってた

$ node 

> process.env
{ MANPATH: '/hoge/fuga/piyo/man',
TERM: 'xterm-256color',
NVM_PATH: '$HOME/.nvm/v0.10.x/lib/node',
USER: 'takoba',
PATH: '/hoge/fuga/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/$HOME/bin',
LANG: 'ja_JP.UTF-8',
...
_: '$HOME/.nvm/v0.10.x/bin/node' }