This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |