I want to send my server.js
(in an AngularJS controller) an set the id
parameter like this:
$http
.get('/getCst', {
params: {
id: customerID
}
})
.success(function (data,status) {
$scope.customer = data
});
But i'm not sure if this is the correct way and what to write in the Node.js server.js
:
app.get('/getCst', function (req, res) {
console.log(//how do i get the id sent by the client?);
});