Skip to content

Instantly share code, notes, and snippets.

@stravid
Created September 20, 2011 08:41
Show Gist options
  • Select an option

  • Save stravid/1228655 to your computer and use it in GitHub Desktop.

Select an option

Save stravid/1228655 to your computer and use it in GitHub Desktop.
# test.coffee
Test =
print: ->
console.log("Test.print called")
if module.exports?
module.exports = Test
else
@Test = Test
# server.coffee
Test = require './test'
Test.print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment