For example suppose client side I have a JavaScript function
function getLocation() {
var latitude = ...;
var longitude = ...;
}
The coordinates are retrieved using a function call to Google or similar. How can I transmit this information to my Node.js server?
The easiest way? Set up Express and have your client side code communicate via Ajax (for example, using jQuery).
On the client side, you might call it like this:
Note this code is simply an example; you’ll have to work out the error handling, etc.
Hope that helps.