yinxin630 / fiora-backend

(deprecated. see https://github.com/yinxin630/fiora) backend of a web chat application. visit frontend (https://github.com/yinxin630/fiora-frontend)
57 stars 15 forks source link

socket.io #1

Open z2014 opened 7 years ago

z2014 commented 7 years ago
var server = require('http').Server(app.callback());
  var io = require('socket.io')(http);
  io.on('connection',function(socket) {
    socket.on('send',function(data) {
      console.log('data',data);
      socket.emit('server',{data:'server'});
    });
  });

when i use koa,exports app, i require app in another router,it catch err that app.callback is not a function,how to solve it?

yinxin630 commented 7 years ago

Is it possible to provide complete code? And, this project is no longer maintained. You can use yinxin630/fiora