Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Created August 31, 2011 20:04
Show Gist options
  • Save mahemoff/1184557 to your computer and use it in GitHub Desktop.
Save mahemoff/1184557 to your computer and use it in GitHub Desktop.
DRY "require" of multiple modules in Node
"underscore,connect,express,redis,sys,coffee-script,fs"
.split(',').forEach (lib) -> global[lib] = require lib
# make macros if you like
_ = underscore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment