I have some CoffeeScript code that reads in data from an http stream.
https = require 'https'
export.commScore = (IP,from,file)->
options =
path: "ctasd/ClassifyMessage_File",
host: "127.0.0.1",
method: "POST",
port: "8088",
headers:
"Accept-Language":"en-us",
"Accept":"*/*",
"User-Agent":"Commtouch HTTP Client",
"X-CTCH-PVer": "0000001",
"X-CTCH-SenderIP": IP,
"X-CTCH-MailFrom": from,
"X-CTCH-FileName": file
stream = http.request(options,(response)->)
Every time I try to compile this code I get an error that says:
error: unexpected ,
path: "ctasd/ClassifyMessage_File",
^
I have checked CoffeScripts documentation to make sure I was creating this object correctly and Node's http API to make sure I was setting up the stream correctly and everything checked out. I've also tried consulting the all knowing Google to see if anybody had any similia issues but couldn't find anything. Why does CoffeeScript refuse to compile my code?