I have a controller named
api/meeting/meeting.controller.coffee
class Talker
constructor: (@name) ->
talk: ->
console.log "Talker name is" + @name
module.exports.meeting = (req, res, next) ->
talker = new Talker 'Bob'
talker.talk
This is how I reference the above file in my index.coffee
controller = require './meeting.controller'
router.post('/', controller.meeting );
The wiring is done in routes.js
:
`app.use('/meeting/', require('./api/meeting'));`
Although the wiring and routing are functioning properly, the console.log from the class isn't being displayed in my CLI. Any suggestions on how to resolve this issue?