Monday, 29 May 2017

Failed to load resource: net::ERR_CONNECTION_REFUSED on NodeJs ,AngularJs Web Application

when i run my web application i get this error.this was happened suddenly.my application is MEAN stack appllication whicj has a end to end connection through APIs.

Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at ServerResponse.res.set.res.header (D:

this is an API that is being exposed.

app.post('/api/filesReadUpload', function(req, res) {

    var eventReadUpload=new filesReadUpload({
      //id:req.body.id,
        dat:req.body.dat,
        details:req.body.details,
        tim:req.body.tim,
      //  space:req.body.space

    });

    eventReadUpload.save(function(err) {
      if (err)
          res.send(err);

      res.json({ message: 'Read file!' });
});
        });

enter image description here

can anyone support with this.if this information is not enough please inform me.

Thanks



via Shan

No comments:

Post a Comment