Skip to content

Instantly share code, notes, and snippets.

@sgentile
Created July 31, 2012 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgentile/3212655 to your computer and use it in GitHub Desktop.
Save sgentile/3212655 to your computer and use it in GitHub Desktop.
Calling a Module with Coffeescript
#helloWorld.coffee file
# Node Module
run = ->
console.log 'This is example node module'
exports.run = run
# Calling from another file, ie. app.coffee
helloWorldModule = require "./helloWorld"
helloWorldModule.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment