Skip to content

Instantly share code, notes, and snippets.

@maxbeatty
Created May 30, 2014 16:41
Show Gist options
  • Save maxbeatty/703a08f8f5e185480cb7 to your computer and use it in GitHub Desktop.
Save maxbeatty/703a08f8f5e185480cb7 to your computer and use it in GitHub Desktop.
Global config via JSON file in Node (`node index.js`)
global.config = require('./path-to-config.json');
require('./other');
console.log(global.config.key);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment