I'm currently exploring sailsjs and trying out a simple example from their main page, but I keep encountering this error:
TypeError: socket.request is not a function
socket.request('/user', {}, function(users){ console.log(users); });
This is the code snippet causing the issue:
var socket = io.connect('http://localhost:1337');
socket.on('connect', function (){
socket.request('/user', {}, function(users){ console.log(users); });
socket.on('message', function (message){
console.log("Got message", message);
});
});
Any assistance would be greatly appreciated!