Export module in CoffeeScript for NodeJs
Simple way of exporting your module in CoffeeScript
#module.coffee
class Module
construct: (@name) ->
module.exports = Module
#index.coffee
Module = require './module'
instance = new Module
Written by Milos Dakic
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
iam4x
94.17K
ericdfields
63.02K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#