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.