We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 {}
require('./socket')
{}
The text was updated successfully, but these errors were encountered:
when you export IO with the brackets you have to import it with the brackets like so: const { io } = require('./socket')
const { io } = require('./socket')
Sorry, something went wrong.
No branches or pull requests
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{}
The text was updated successfully, but these errors were encountered: