I'm working on an iOS App with an socket.io/koa (https://github.com/koajs/koa) service connection. For testing the service I'm using thor (https://github.com/observing/thor). The problem is, that my socket.io service wont return anything. When I look at thors response, I see, that there is a connection, but no callback from the service. This is my code for building and testing the socket.io service:
var server = require('http').Server(app.callback()),
io = require('socket.io')(server);
io.on('connection', function(socket) {
socket.emit('news', { hello: 'world' });
console.log('it works.');
});
In my opinion there should be a log on the console and the written "{ hello: 'world' }" in the view of my client. Is there a problem with koa, or am I doing anything wrong?