Wednesday, 31 May 2017

how to reverse proxy client to another another server using nodejs

i was looking a for a way to reverse-proxy my application which is running on localhost:7200 to another server running on 10.0.0.1:3000 by using a POST request

apiRoutes.post('/route', function(req, res) {
    res.json({ message: 'Done' });
      var tunroute=req.body.address;
      console.log(tunroute);

       //{tunroute contains the address i.e 10.0.0.1:300}

       //{ here is where i want to proxy to server at 10.0.0.1:300 }

  });



via Karan Singh Kochar

No comments:

Post a Comment