Open z2014 opened 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?
Is it possible to provide complete code? And, this project is no longer maintained. You can use yinxin630/fiora
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?