I want to get created io from other file.
socket.js
const IO = require( 'koa-socket-2' );
const io = new IO();
module.exports = {
io
}
File where I want to get access to io:
const io = require('./socket').io;
But io is undefined, and require('./socket') is {}
I want to get created io from other file.
socket.js
File where I want to get access to io:
But io is undefined, and
require('./socket')is{}