Hi All

I am trying to develop a Full Stack App using MEAN stack along with ionic 
framework for the front end. As such I am not able to run the server on the 
same port as the ionic as it by default takes up a port(8100). So the 
server running at port 3000 for example has to respond to a GET request 
made from port 8100.

var req = {
      method: 'GET',
      url: 'http://localhost:3000/test/'+id
    };
    $http(req).success(function(response){
      console.log("test sucesssful");
    });

I am not able to see the above "test successful" log in my browser though 
the server accepts the GET request and the response header is 200. When I 
use POSTMAN to test it I see the response body too but not in the browser.

Server snippet --

app.get("/test/:id",function(req,res){
  console.log("Got a request");
  var id = req.params.id;
  res.send("Got your request:");
  console.log(id);
});

All the logs as done in console.log() calls work. It's just that the 
response is not seen in the browser but can be seen when tried with POSTMAN.
I am a beginner fiddling with MEAN stack. Thanks for assistance in advance.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/44ee73b4-ca81-44dd-a6d0-a41c43094fd1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to