Skip to content

Instantly share code, notes, and snippets.

View REX500's full-sized avatar
🎯
Focusing

Filip Malek REX500

🎯
Focusing
View GitHub Profile
var socket = io.connect("http://localhost:500");
// when page is opened it makes a call to the db to retrive all leasure bikes etc.
socket.emit("retrive_leasure", {"message":"retrive_leasure"});
// getting bikes back from the database
socket.on("leasure_bikes_from_db", function(jData){
// putting all of the leasure bikes into a dynamically allocated div's
// console.log(jData.length);