In javascript I can have a route in my nodejs app that work like this:
exports.hasVote(a,b) = function(err, res) {
res(true)
}
Problem is when I try to do the same in coffeescript (I moved to coffeescript...). So I replaced the function above with this one:
exports.hasVote(a, b) = (err, res) ->
res true
When I run the app I get this error:
error: unexpected =
How can I accomplish this in coffeescript and have it work just like it used to in javascript?
exports.hasVote(a,b) = ...is not valid JavaScript.