2

hi am new to nodejs by using compound as framework, i have been getting error when request through on https. i tried simple code is

 action(function getteams(req){
 Mymodel.find({"season": body.year}, function(err, team){
     console.log("Season "+ body.year)
    if(!err) return send(team);
    return console.log(err);
    })
 })

when i hardcode body.year as "2001" i get the answer, but if send request through http it throughs error called "socket hang up". how to come across this.

God
  • 674
  • 2
  • 6
  • 31

1 Answers1

0

It is not clear you describe it. But do not forget the http request never res.send (data) OR res.end ()

Yaroslav L.
  • 585
  • 2
  • 7
  • 17