how to get data from java server to javascript by using socket io and nodejs?

I am dealing with a sort of gps tracking system. i have a map and i need to update the current position of the vehicle. i need to use socket io for real time visualization. i checked out nodejs tutorials but could not derive a solution. i have a server written in java and i want to send updates to my map written in javascript. so how can i receive data from my java server by using socket io and/or nodejs?var http = require("http"); var server = http.createServer(); server.listen(????) what should i add to these code?

You could use WebSockets (HTML5). Install the websocket package to the folder where your node.js server is running:

npm install websocket

Here a link to a good tutorial about websockets and node.js.