working on setting up a simple dev environment while i learn Meteor (built on Node.js)
starting with a simple test, in env.sh i have only:
export CUSTOM_VAR="some value"
then in app.js, I have:
if (Meteor.isClient) {
console.log(Meteor.settings);
}
if (Meteor.isServer) {
console.log('Meteor Settings:');
console.log(Meteor.settings);
console.log('');
console.log('Environment Variables:');
console.log(process.env);
console.log(process.env.CUSTOM_VAR);
}
the results i get seem to be variables from some other env.sh, and CUSTOM_VAR comes up undefined.
once it came up fine with "some value", but then not again (and i've done everything consistently)
here are full results:
I20150113-02:23:27.169(-8)? Meteor Settings:
I20150113-02:23:30.006(-8)? {}
I20150113-02:23:30.007(-8)?
I20150113-02:23:30.007(-8)? Environment Variables:
I20150113-02:23:30.007(-8)? { VIRTUALENVWRAPPER_PROJECT_FILENAME: '.project',
I20150113-02:23:30.007(-8)? TERM_PROGRAM: 'Apple_Terminal',
I20150113-02:23:30.007(-8)? TERM: 'xterm-256color',
I20150113-02:23:30.008(-8)? SHELL: '/bin/bash',
I20150113-02:23:30.008(-8)? TMPDIR: '/var/folders/tl/pcrp79f50t1_j0v_kxzdnzyw0000gn/T/',
I20150113-02:23:30.008(-8)? Apple_PubSub_Socket_Render: '/tmp/launch-u46zHS/Render',
I20150113-02:23:30.008(-8)? TERM_PROGRAM_VERSION: '309',
I20150113-02:23:30.008(-8)? OLDPWD: '/Users/mac/.meteor/packages/meteor-tool/1.0.38/meteor-tool-os.osx.x86_64',
I20150113-02:23:30.009(-8)? TERM_SESSION_ID: '48EC052B-755D-4025-8E90-A2353211C791',
I20150113-02:23:30.009(-8)? USER: 'mac',
I20150113-02:23:30.009(-8)? COMMAND_MODE: 'unix2003',
I20150113-02:23:30.009(-8)? SSH_AUTH_SOCK: '/tmp/launch-TQwj0K/Listeners',
I20150113-02:23:30.009(-8)? __CF_USER_TEXT_ENCODING: '0x1F5:0:0',
I20150113-02:23:30.009(-8)? Apple_Ubiquity_Message: '/tmp/launch-WV3DC1/Apple_Ubiquity_Message',
I20150113-02:23:30.010(-8)? WORKON_HOME: '/Users/mac/Users/mac/.virtualenvs',
I20150113-02:23:30.010(-8)? PROJECT_HOME: '/Users/mac/_DEV',
I20150113-02:23:30.010(-8)? PATH: '/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
I20150113-02:23:30.010(-8)? VIRTUALENVWRAPPER_HOOK_DIR: '/Users/mac/Users/mac/.virtualenvs',
I20150113-02:23:30.010(-8)? PWD: '/Users/mac/_INTRA/_APPS/Meteor_test/todos/app',
I20150113-02:23:30.010(-8)? LANG: 'en_US.UTF-8',
I20150113-02:23:30.011(-8)? SHLVL: '1',
I20150113-02:23:30.011(-8)? HOME: ...
I20150113-02:23:30.011(-8)? LOGNAME: ...
I20150113-02:23:30.011(-8)? PORT: ...
I20150113-02:23:30.011(-8)? ROOT_URL: 'http://localhost:3000/',
I20150113-02:23:30.011(-8)? MONGO_URL: 'mongodb://127.0.0.1:3001/meteor',
I20150113-02:23:30.012(-8)? MOBILE_DDP_URL: 'http://localhost:3000',
I20150113-02:23:30.012(-8)? MOBILE_ROOT_URL: 'http://localhost:3000',
I20150113-02:23:30.012(-8)? MONGO_OPLOG_URL: 'mongodb://127.0.0.1:3001/local',
I20150113-02:23:30.012(-8)? APP_ID: ...
I20150113-02:23:30.012(-8)? NODE_ENV: 'development',
I20150113-02:23:30.012(-8)? HTTP_FORWARDED_COUNT: '1',
I20150113-02:23:30.013(-8)? ENABLE_METEOR_SHELL: 'true' }
I20150113-02:23:30.013(-8)? undefined
This line in particular is interesting:
I20150113-02:23:30.010(-8)? PATH: '/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
Why is the path in a Python folder? I think that maybe I set up a global environment in python some years ago? I'm new to this environment stuff. Any insight in how to resolve this?